CRYPTO.HMAC
Creates an hash based authentication code (HMAC) for given text and secret. The used hash algorithm can be optionally specified. For a list of supported hash algorithms please refer to Hash Algorithms. The used hash algorithms are from the OpenSSL Library. See their docs for more details.
Syntax
=CRYPTO.HMAC(Text, Secret, [Algorithm])
Arguments
Name | Type | Description |
---|---|---|
Text | String | A text to create hash value for. |
Secret | String | A text used as key to generate the cryptographic HMAC hash. |
Algorithm (optional) | String | The hash algorithm to use. Defaults to "sha256" |
Return
The hmac value or an Error Code
Examples
Formula | Result | Comment |
---|---|---|
| a28f6aee6a27565bf1b868da1947c35147039fe6482b35d3b8fdeb9592e42e99 | By default "sha256" is used. |
| 9ffaf5da07c95deaa000729cd65fefea | Same text and secret as before but creates an hmac using "md5" algorithm. |