Choose where you’d like to start

HMAC-SHA1

Description

The zoho.encryption.hmacsha1 task returns the hash corresponding to the given text generated using the HMAC-SHA1 algorithm.

Syntax

<response> = zoho.encryption.hmacsha1(<key>, <data>, [<output_type>]);

where:

ParamsData typeDescription

<response>

TEXT

The hash generated using the HMAC-SHA1 algorithm.

<key>

TEXT

The secret key with which the hash needs to be generated.

<data>

TEXT

The source text whose corresponding hash needs to be computed.

<output_type>

TEXT

The type in which the generated hash needs to be represented. By default, the output type is base64.

Allowed values:

  • hex - returns the hash in hexadecimal format
Note: This parameter is not applicable to Zoho Creator.

Example

The following script returns the hash generated using the HMAC-SHA1 algorithm for the text - My#New#Password with the key - Use me to generate hash:

response = zoho.encryption.hmacsha1("Use me to generate hash", "My#New#Password");

where:

response
The TEXT that represents the hash value returned by this task. Here, the hash returned is VK9VMxdsbxZBLHKgSEZYMEUlURs=.
"Use me to generate hash"
The TEXT that represents the secret key with which the hash is generated.
"My#New#Password"
The TEXT that represents the source text whose corresponding hash needs to be computed.

Related Links

Get Started Now

Execute