[yoy - Why-O-Why]yoy - “Why-O-Why”

» frame | home browse filter search | refresh | log on

  printed maandag 22 december 2014 21:33:08 from www.yoy.be

download
Comment...
Add another
Add child
Edit
Move
Delete
Add token
Add reference

md5.pas

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.

md5.pas with MD5Hash for strings, sometimes used with passwords

md5Stream.pas with 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!).

Enjoy. 

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'm at it SHA256 as well

md5.zip (12KB)

location: freeware
url: http://yoy.be/docs/md5.zip
created: 16/02/2012 20:26:41 « modified: 6/05/2014 19:07:31 (diff) weight: 0

children, tokens, references comments (5)

delphi up down edit   del   created: 16/02/2012 20:26:55 « modified: 16/02/2012 20:26:55 weight: 0
(friendly-url) up down edit   del   created: 16/02/2012 20:27:10 « modified: 14/03/2013 21:24:31 weight: 0

(md5)(md5/)(sha1)(sha1/)(ripemd160)(ripemd160/)(sha256)(sha256/)