Encode data using hash and HMAC methods:
The data
parameter is the data to encrypt or encode, and it must be a string.
The algorithm must be one of the following values:
Unlike the create_hash
method, create_hmac
requires a key to function. The list of accepted algorithms is the same.
The encoding must be either "base64"
or "hex"
.
When any operation fails, Null
is returned and a say Error(error_message)
is emitted.