| 271 | } |
| 272 | |
| 273 | void CRIPEMD160::Finalize(unsigned char hash[OUTPUT_SIZE]) |
| 274 | { |
| 275 | static const unsigned char pad[64] = {0x80}; |
| 276 | unsigned char sizedesc[8]; |
| 277 | WriteLE64(sizedesc, bytes << 3); |
| 278 | Write(pad, 1 + ((119 - (bytes % 64)) % 64)); |
| 279 | Write(sizedesc, 8); |
| 280 | WriteLE32(hash, s[0]); |
| 281 | WriteLE32(hash + 4, s[1]); |
| 282 | WriteLE32(hash + 8, s[2]); |
| 283 | WriteLE32(hash + 12, s[3]); |
| 284 | WriteLE32(hash + 16, s[4]); |
| 285 | } |
| 286 | |
| 287 | CRIPEMD160& CRIPEMD160::Reset() |
| 288 | { |