- if (strcmp("HASH", request.id) == 0)
- {
- unsigned char bytes[SHA256_DIGEST_SIZE];
- HashRequest& req = static_cast<HashRequest&>(request);
- SHA256(req.data.data(), bytes, req.data.length());
- req.binresult.assign((char*)bytes, SHA256_DIGEST_SIZE);
- }
- else if (strcmp("NAME", request.id) == 0)
- {
- static_cast<HashNameRequest&>(request).response = "sha256";
- }