[IronPython] md5 for IronPython

Shawn Farkas Shawn.Farkas at microsoft.com
Thu Jan 26 18:07:36 CET 2006


If you wanted to easily extend it to other algorithms, then instead of using MD5.Create() in your __init__, you could instead do HashAlgorithm.Create("MD5").

That allows you to swap in any hash algorithm you'd like (and that the framework supports) just by swapping the string.

-Shawn

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo
Sent: Thursday, January 26, 2006 2:55 AM
To: users at lists.ironpython.com
Subject: [IronPython] md5 for IronPython

md5 module is implemented as a C extension module in CPython. As this
is currently not included in IronPython, I wrote a tiny wrapper around
System.Security.Cryptography. Here it is in case you want it too.

http://sparcs.kaist.ac.kr/~tinuviel/devel/fepy/md5.py

It's under 30 lines!

It should be trivial to adapt this to other hash algorithms.

Seo Sanghyeon
_______________________________________________
users mailing list
users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



More information about the Ironpython-users mailing list