$hmac » History » Revision 1
Revision 1/3
| Next »
Per Amundsen, 04/13/2016 05:11 PM
Added in 2.3
$hmac(text|&binvar|filename, [key], [hash], [N])
Returns an HMAC (keyed-Hash Message Authentication Code) based on the supplied key.
Parameters
text|&binvar|filename - The text or &binvar or filename to calculate.
[key] - The key to hash with. (optional)
[hash] - Hash type: md5, sha1 (default), sha256, sha384, or sha512. (optional)
[N] - The type to calculate N = 0 for plain text (default), 1 for &binvar, 2 for filename. (optional)
Example
; calculate the sha1 hmac hash for the text 'Hello World' using the key 'test'. //echo -ag The sha1 hmac for Hello World is $hmac(Hello World, test, sha1)
Updated by Per Amundsen over 8 years ago · 1 revisions