| 183 | } |
| 184 | |
| 185 | void CSHA512::Finalize(unsigned char hash[OUTPUT_SIZE]) |
| 186 | { |
| 187 | static const unsigned char pad[128] = {0x80}; |
| 188 | unsigned char sizedesc[16] = {0x00}; |
| 189 | WriteBE64(sizedesc + 8, bytes << 3); |
| 190 | Write(pad, 1 + ((239 - (bytes % 128)) % 128)); |
| 191 | Write(sizedesc, 16); |
| 192 | WriteBE64(hash, s[0]); |
| 193 | WriteBE64(hash + 8, s[1]); |
| 194 | WriteBE64(hash + 16, s[2]); |
| 195 | WriteBE64(hash + 24, s[3]); |
| 196 | WriteBE64(hash + 32, s[4]); |
| 197 | WriteBE64(hash + 40, s[5]); |
| 198 | WriteBE64(hash + 48, s[6]); |
| 199 | WriteBE64(hash + 56, s[7]); |
| 200 | } |
| 201 | |
| 202 | CSHA512& CSHA512::Reset() |
| 203 | { |
nothing calls this directly
no test coverage detected