181:e254398fcc7c | 182:20ca0a6be175 |
---|---|
304 { | 304 { |
305 sprintf (checksum + i * 2, "%02x", signature[i]); | 305 sprintf (checksum + i * 2, "%02x", signature[i]); |
306 } | 306 } |
307 } | 307 } |
308 | 308 |
309 std::string md5(const char *buffer) | |
310 { | |
311 char checksum[33]; | |
312 CalculateMD5(reinterpret_cast<const unsigned char*>(buffer), strlen(buffer), checksum); | |
313 checksum[sizeof checksum - 1] = '\0'; | |
314 return {checksum}; | |
315 } | |
316 | |
309 END_ZFC_NAMESPACE | 317 END_ZFC_NAMESPACE |