Syntax
HMAC SHA1 KeyData=<keydata> SourceData=<sourcedata> Result=<var>Description
Computes a standard RFC 2104 keyed-hash message authentication code using the SHA-1 hash algorithm.Parameters
<keydata>
- The key string to be used.
<sourcedata>
- The data to be HMACed.
<var>
- The variable to receive the MAC.
Remarks
A Message Authentication Code is a number computed from the contents of a text message that is used to prove the integrity of a message. Typically, message authentication codes are used between two parties that share a secret key in order to validate information transmitted between these parties.SHA-1 is the only hash algorithm supported at this time.
The MAC produced by this statement is 20 bytes in length.
Example
Global plainText = "The plain text."
Global secret
Global decryption
HMAC SHA1 KeyData="My authentication key" SourceData=plainText Result=mac
Base64Encode SourceData=mac Result=b64mac
MessageBox Title="MAC" Text=b64macThe above example displays the base-64-encoded message authentication code in a message box.