| 104 | |
| 105 | |
| 106 | void DataHash::Result(HashValue *Result) |
| 107 | { |
| 108 | Result->Type=HashType; |
| 109 | if (HashType==HASH_RAR14) |
| 110 | Result->CRC32=CurCRC32; |
| 111 | if (HashType==HASH_CRC32) |
| 112 | Result->CRC32=CurCRC32^0xffffffff; |
| 113 | if (HashType==HASH_BLAKE2) |
| 114 | { |
| 115 | // Preserve the original context, so we can continue hashing if necessary. |
| 116 | blake2sp_state res=*blake2ctx; |
| 117 | blake2sp_final(&res,Result->Digest); |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | |
| 122 | uint DataHash::GetCRC32() |
no test coverage detected