Cryptographic hashes?

Mike Rutenberg mdrs at akasta.com
Tue Aug 12 12:52:22 UTC 2003


Andreas,

There are two cryptographic hashes which are easy to use in Squeak, SHA
and MD5.  Both hashes are, for most normal purposes, equivalent in
tamper resistance.

MD5 is used in some internet standards, such as APOP password obscuring
POP3 authentication.  You can get it from the SM or as a separate
download.

SHA is a US FIPS standard. 
http://www.itl.nist.gov/fipspubs/fip180-1.htm  The main advantage is
that SHA is built into the core Squeak system and is about 30 times
faster than MD5 (example below).

Hope this helps,

Mike

--------------

msg _
'12345678901234567890123456789012345678901234567890123456789012345678901234567890'.

[1000 timesRepeat: [MD5 hashMessage: msg]] timeToRun
	7984

[1000 timesRepeat: [SecureHashAlgorithm new hashMessage: msg]] timeToRun
	246



More information about the Squeak-dev mailing list