Home Search

DriveWorks Solo 21
HashHMACSHA1

Send Feedback

HashHMACSHA1

hashes a value using HMAC-SHA1 and returns it as a Base64 encoded string.

Sometimes REST requests using OAuth2.0 authentication need to send a signing key to ensure data has not been tampered with - HMAC SHA1 can be used to generate the signing key.

To ensure compatibility with the DriveWorks rules engine, Hashes generated with this function are automatically Base64 encoded - (by default, HMAC SHA1 returns binary data, which is not supported in the rules engine)

Syntax

HashMACSHA1([Key],[Value])

Where:

Key is the signing key to use during encryption.

Value is the base string to encrypt.

Examples

RuleMeaning
HashHMACSHA1(1,DWVariableToHash)Will return a hash of the given value, using 1 as the key.

For more information on HMACSHA1 please see HMACSHA1 Class (MSDN article).