- MD5Request* MD5 = (MD5Request*)request;
- if (strcmp("MD5_KEY", request->GetId()) == 0)
- {
- this->key = (unsigned int*)MD5->GetKeyData();
- }
- else if (strcmp("MD5_HEX", request->GetId()) == 0)
- {
- this->chars = (char*)MD5->GetOutputs();
- }
- else if (strcmp("MD5_SUM", request->GetId()) == 0)
- {
- static char data[MAXBUF];
- GenHash((const char*)MD5->GetHashData(), data, chars ? chars : "0123456789abcdef", key);
- return data;
- }
- else if (strcmp("MD5_RESET", request->GetId()) == 0)
- {
- this->chars = NULL;
- this->key = NULL;
- }
- return NULL;
+ char res[33];
+ GenHash(sdata.data(), res, HexMap, IV, sdata.length());
+ return res;