
See the following link for a purely functional and straight-forward implementation of SHA1. Disclaimer: Please be kind to me, I haven't done much Haskell (yet). And I know nothing about SHA1 except its specification. http://hpaste.org/1695#a2 It performs better than the SHA1 algorithm in Crypto: It is faster by a factor of approximately e. ;-) It is also competitive (regarding time) with the »unsafe« SHA1 implementation posted here some days ago, although it uses considerably more memory. Of course, you may safely forget it if you're interested in performance near a C implementation such as GNU sha1sum. I'd heartily welcome any comments or suggestions for improvement, as well as benchmark results, especially if they differ from mine. I'm using the standard ghc -O2, by the way. Malte