<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 12, 2015 at 2:37 PM, Patrick Mylund Nielsen <span dir="ltr"><<a href="mailto:haskell@patrickmylund.com" target="_blank">haskell@patrickmylund.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><span class=""><div dir="ltr">On Thu, Nov 12, 2015 at 5:30 PM Dan Stromberg <<a href="mailto:strombrg@gmail.com" target="_blank">strombrg@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><br></div><div>What's the best module for doing an MD5 hash?<br></div><br></div>More specifically, I want to hash the first few dozen K of a file, and then the entire file - to get two different hashes.<br></div></div></div></blockquote><div><br></div></span><div>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: <a href="https://blake2.net/" target="_blank">https://blake2.net/</a> </div><div><br></div><div>You might also be interested in <a href="https://hackage.haskell.org/package/saltine" target="_blank">https://hackage.haskell.org/package/saltine</a></div></div></div></blockquote><div><br></div><div>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.<br><br></div><div>I'll look at cryptohash.<br><br></div><div>Thanks.<br><br></div></div><div class="gmail_signature">Dan Stromberg</div>
</div></div>