timkurvers / as3-crypto

Fork of Henri Torgemane's excellent as3 cryptography library
http://code.google.com/p/as3crypto
Other
93 stars 46 forks source link

added the pbkdf2 #8

Open jimmyjjames opened 11 years ago

jimmyjjames commented 11 years ago

Hi, i added to the as3crypto lib the widely used key derivation function "pbdkf2" which is defined in PKCS#5 (rfc2898) chapter 5.2. The implementation uses HMAC with SHA1 as the pseudorandon function. The output has been verified with three different javascript implementations: https://code.google.com/p/crypto-js/ http://anandam.name/pbkdf2/ http://bitwiseshiftleft.github.com/sjcl/ (for the last, the stanford implementation i had to switch to HMAC with SHA256 as the pseudorandom function, since it is what they use)

more information on this: http://en.wikipedia.org/wiki/Pbkdf2

furthermore i added some util helper functions for handling bytearrays and generalized the Hex.fromArray() function (doesn't break the api)

It would be nice if would pull the changes.

have a nice day, alex