Documentation
No documentation yet
At some point, this should have some useful content.
com.hurlant.crypto.Crypto is a good starting point: For example, if you want AES-128 in CTR mode with IV prepended, just ask for var cipher:ICipher = Crypto.getCipher("simple-aes128-ctr", key); where <key> is a ByteArray representing your key. If your key is in a different format, you can use Hex or Base64 to convert it: var key:ByteArray = Hex.toArray("01020304050708090a0b0c0d0e0f00"); var key:ByteArray = Base64.toArray("AQIDBAUGBwgJCgsMDQ4PAA=="); Once you have your cipher, you can encrypt and decrypt with cipher.encrypt(data); cipher.decrypt(data); where <data> is a ByteArray. Note that every cipher modifies the data in place. If you want a HMAC of SHA-224 with 128 significant bits, you can use var hmac:HMAC = Crypto.getHMAC("hmac-128-sha224"); You can then use it as: var value:ByteArray = hmac.compute(key, data); That's it for now. Source files that might help: - com/hurlant/crypto/Crypto.as - The tests under com/hurlant/tests/*.as - The Flex 2 components (the *.mxml files)
Until then, the source is the documentation.