Hash Functions
Jan Skibinski
jans@numeric-quest.com
Fri, 12 Jan 2001 03:41:45 -0500 (EST)
On 12 Jan 2001, Steinitz, Dominic J wrote:
> I was thinking of using MD5 or SHA-1 for an application.
> Is there a Haskell library that contains these or other hash algorithms
> that have a very low probability of giving clashes?
>
> Dominic.
http://www.numeric-quest.com/haskell/bridge/index.html
contains interface to MD5 code in C via Greencard. There
is a support for one function only (the only
function I really needed for a certain CGI application)
digest :: String -> String.
It uses 'unsafePerformIO' but you could redesign it
changing its signature to
digest :: String -> String IO
or extend it to supply other functions you need.
Jan