A class to make it easy to use the rest of the framework.
As a side-effect, using this class will cause most of the framework
to be linked into your application, which is not always what you want.
If you want to optimize your download size, don't use this class.
(But feel free to read it to get ideas on how to get the algorithm you want.)
public static function getCipher(name:String, key:ByteArray, pad:IPad = null):ICipher
Things that should work, among others:
"aes"
"aes-128-ecb"
"aes-128-cbc"
"aes-128-cfb"
"aes-128-cfb8"
"aes-128-ofb"
"aes-192-cfb"
"aes-256-ofb"
"blowfish-cbc"
"des-ecb"
"xtea"
"xtea-ecb"
"xtea-cbc"
"xtea-cfb"
"xtea-cfb8"
"xtea-ofb"
"rc4"
"simple-aes-cbc"
Parameters
| name:String |
| |
| key:ByteArray |
| |
| pad:IPad (default = null) |
Returns public static function getHash(name:String):IHash
Things that should work:
"md5"
"sha"
"sha1"
"sha224"
"sha256"
Parameters
Returns public static function getHMAC(name:String):HMAC
Things that should work:
"sha1"
"md5-64"
"hmac-md5-96"
"hmac-sha1-128"
"hmac-sha256-192"
etc.
Parameters
Returns public static function getKeySize(name:String):uint
Returns the size of a key for a given cipher identifier.
Parameters
Returns public static function getMAC(name:String):MAC Parameters
Returns public static function getPad(name:String):IPad Parameters
Returns public static function getRSA(E:String, M:String):RSAKey mostly useless.
Parameters
Returns
Mon May 20 2013, 09:16 PM +02:00