- HashRequest* SHA = (HashRequest*)request;
- if (strcmp("KEY", request->GetId()) == 0)
- {
- this->currkey = (unsigned int*)SHA->GetKeyData();
- }
- else if (strcmp("HEX", request->GetId()) == 0)
- {
- this->chars = (char*)SHA->GetOutputs();
- }
- else if (strcmp("SUM", request->GetId()) == 0)
- {
- static char* data;
- data = (char*)RMD((byte *)SHA->GetHashData().data(),SHA->GetHashData().length(), currkey);
- for (int i = 0, j = 0; i < RMDsize / 8; i++)
- {
- data[j++] = chars[data[i] / 16];
- data[j++] = chars[data[i] % 16];
- data[j] = '\0';
- }
- return data;
- }
- else if (strcmp("NAME", request->GetId()) == 0)
- {
- return "ripemd160";
- }
- else if (strcmp("RESET", request->GetId()) == 0)
- {
- this->chars = "0123456789abcdef";
- this->currkey = NULL;
- }
- return NULL;