» frame | home browse filter search | refresh | log on
printed woensdag 19 juni 2013 21:50:32 from www.yoy.be
This is odd, it looks like there isn't an open source md5.pas unit. And by open source I mean under a permissive license or without copyright or licensing. So I set out to write my own and share it here. I based it on the original RFC, and even more the description than the reference implementation, because it uses a few of those C tricks I don't like. I hope it's performant enough, in case you're demanding performance of it. I've done some testing myself, but if you detect any kind of issue, please let me know.
MD5Hash for strings, sometimes used with passwords
MD5HashFromStream which takes any kind of stream (TFileStream, TMemoryStream...), and optionally a preset number of bytes to take from the stream (from the current position!).
Update: since MD5 and SHA1 are really similar, I've done the same for SHA1 and added sha1.pas and sha1Stream.pas.
Update 2: since I needed it for something else, I've added RIPEMD160 as well. And while I'l at it SHA256 as well
created: 16/02/2012 20:26:41 « modified: 14/03/2013 21:24:12 (diff) weight: 0
children, tokens, references comments (4)
created: 16/02/2012 20:26:55 «
modified: 16/02/2012 20:26:55
(friendly-url) up down edit del created: 16/02/2012 20:27:10 « modified: 14/03/2013 21:24:31 weight: 0