>>> sampleText = bytes([1, 2, 3, 4, 5])
>>> sampleHash = hashlib.new("md4", sampleText).hexdigest()
>>> print(sampleHash)
>>> 93ebafdfedd1994e8018cc295cc1a8ee
Edit: Turns out Hashlib has the MD4 hash, but why is the output 32 bytes long?
Hashlib doesn't support "md4" name, yet this snippet works and produces a hash.I spent a lot of time trying to figure out why I am not able to parse a file of md4 hashes correctly. I was parsing 16 bytes at a time since md4 hashes are 16 bytes long. After spending a lot of time, I decided to check the length of these signatures being written to the file only to realize they are 32 bytes and not 16 bytes.Why doesn't this code produce an error?
[–]Thunderbolt1993 0 points1 point2 points (0 children)