Friday, October 24, 2008

Actionscript 3 HMAC: Keyed-Hashing

I have implemented the HMAC (RFC2104) in actionscript 3 using the as3 core library. I have submitted a patch to as3 core lib. I developed the HMAC library because I needed it to perform the CRAM-MD5 for my actionscript 3 mail api project AsMailer. The HMAC library has been tested for MD5 and SHA1. The library can support other hash methods but they have not been tested.

1 comment:

Anonymous said...

Please also read the following article:
http://blog.rednael.com/2008/09/30/SecuringYourPasswordTransfersWithKeyedHashingHMACCramMD5.aspx

It's a walkthrough example of implementing HMAC-MD5 / Cram-MD5 on a website. The same technique can be used for various client-server situations.
The article explains the benefits of using such a password system and shows you how to implement it using the .Net library at server side (examples in C#), and using Paj’s MD5 Javascript functions at client-side.