Keyed-Hashing for Message Authentication
Implementation based on algorithm description at
http://www.faqs.org/rfcs/rfc2104.html
public static function hash(secret:String, message:String, algorithm:Object = null):String
Performs the HMAC hash algorithm using byte arrays.
Parameters
| secret:String — The secret key
|
|
| message:String — The message to hash
|
|
| algorithm:Object (default = null ) — Hash object to use
|
Returns
| String — A string containing the hash value of message
|
public static function hashBytes(secret:ByteArray, message:ByteArray, algorithm:Object = null):String
Performs the HMAC hash algorithm using string.
Parameters
| secret:ByteArray — The secret key
|
|
| message:ByteArray — The message to hash
|
|
| algorithm:Object (default = null ) — Hash object to use
|
Returns
| String — A string containing the hash value of message
|