| 207 | } |
| 208 | |
| 209 | std::string Sha1ToString(const uint8_t Sha1[kSHA1NumBytes]) { |
| 210 | std::stringstream SS; |
| 211 | for (int i = 0; i < kSHA1NumBytes; i++) |
| 212 | SS << std::hex << std::setfill('0') << std::setw(2) << (unsigned)Sha1[i]; |
| 213 | return SS.str(); |
| 214 | } |
| 215 | |
| 216 | std::string Hash(const uint8_t *Data, size_t Len) { |
| 217 | uint8_t Hash[kSHA1NumBytes]; |