HASH (Version 5.7.3)
x = HASH(method, data [ ,ret_type [ ,length ]])
Parameters:
method: Hash method to use.
data: The data to be hashed.
ret_type: What format the data should be returned in.
length: The length of "data".
method can be one of the following types:
"sha512" "whirlpool" "tiger"
"sha384" "ripemd320" "md5"
"sha256" "ripemd256" "md5"
"sha224" "ripemd160" "md4"
"sha1" "ripemd128" "md2"
ret_type can be:
0 (default) - As-is
1 - Hex
2 - Base64
If "length" is not specified, the full length of "data" is used.
Examples:
hash("sha1","Hello","1") returns
"F7FF9E8B7BB2E09B70935A5D785E0CC5D9D0ABF0"
hash("sha1","Hello","2") returns
"9/+ei3uy4Jtwk1pdeF4MxdnQq/A="
HMAC_HASH (Version 5.7.4)
x = HMAC_HASH(method, data, key [ ,ret_type [ ,length ]])
Parameters:
method: Hash method to use.
data: The data to be hashed.
key: Your HMAC key.
ret_type: What format the data should be returned in.
length: The length of "data".
method can be one of the following types:
"sha512" "whirlpool" "tiger"
"sha384" "ripemd320" "md5"
"sha256" "ripemd256" "md5"
"sha224" "ripemd160" "md4"
"sha1" "ripemd128" "md2"
ret_type can be:
0 (default) - As-is
1 - Hex
2 - Base64
If "length" is not specified, the full length of "data" is used.