
On Thu, Nov 12, 2015 at 2:37 PM, Patrick Mylund Nielsen < haskell@patrickmylund.com> wrote:
On Thu, Nov 12, 2015 at 5:30 PM Dan Stromberg
wrote: What's the best module for doing an MD5 hash?
More specifically, I want to hash the first few dozen K of a file, and then the entire file - to get two different hashes.
I would use the one from cryptohash if you're looking for performance, however I must stress that using MD5 for anything "new" is almost certainly a bad idea. If you aren't doing this for compatibility reasons, you should use something else, like BLAKE2: https://blake2.net/
You might also be interested in https://hackage.haskell.org/package/saltine
My use of MD5 is strictly non-cryptographic. It is in a limited sense for compatibility with other software - but it's more about doing the same algorithm in multiple languages for the sake of comparison. I'll look at cryptohash. Thanks. Dan Stromberg