Open firasuke opened 1 year ago
Here is what I am using:
...
import hashlib/misc/xxhash
proc verify*(file: string, checksum: string): bool =
checksum == $count[XXHASH3_128](readFile(file))
...
Where file is a .tar.gz
tarball (I'll be using make-4.4.tar.gz
as an example.
I am using xxh128sum
to get the expected checksum 15bf27bd70e74eb8c4f71a1028513adf
, but the function above is returning a wrong checksum of faae50855f65ad63b1c4c71c19166a3c
.
How can I fix this?
Any updates to this?
I am trying to use xxHash3 128 bits for hashing a file, I am using
readFile
but I am getting an incorrect checksum.I also tried using
streams
withopenFileStream
and I am getting the same wrong checksum.Any ideas?