[Encrypt_HMAC] generates a keyed hash message authentication code for a given input and password. The tag requires a -Password parameter which specifies the key for the hash and a -Token parameter which specifies the text message which is to be hashed. These parameters should be specified as a string or as a byte stream.
The digest algorithm used for the hash can be specified using an optional -Digest parameter. The digest algorithm defaults to MD5. SHA1 is another common option. However, any of the digest algorithms returned by [Cipher_List: -Digest] can be used.
The output is a byte stream by default. -Base64 specifies the output should be a Base64 encoded string. -Hex specifies the output should be a hex format string like 0x0123456789abcdef. -Cram specifies the output should be in a cram hex format like 0123456789ABCDEF.
Note that [Encrypt_CramMD5] is equivalent to using this tag with the parameters -Digest='MD5' and -Cram.
[Encrypt_HMAC: 'password', 'token']
[Encrypt_HMAC: 'password', 'token', -Digest='sha1']
[Encrypt_HMAC: 'password', 'token', -Digest='sha1', -Base64]
See the Lasso 8 Language Guide for examples of how to use this tag.
Tag Link | [Encrypt_HMAC] | Category | Encryption |
---|---|---|---|
Type | Substitution | Data Source | Any |
Support | Preferred | Version | 8.5.1 |
Output Type | None | Security | None |
Implementation | LDML | Sets | Lasso 8.5 |
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft