Home Search

DriveWorks Solo 22
HashHMACSHA256

Send Feedback

HashHMACSHA256

Hashes a value using HMAC-SHA256 and returns it as a Base64 encoded string.

A Hash-based Message Authentication Code (HMAC) is sometimes required by third party systems that use OAuth 2.0 authentication to send a signing key.

HMAC SHA256 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

HashHMACSHA256([Key],[Value])

Where:

Key is the signing key to use during encryption.

This is also known as a secret key.

Value is the base string to encrypt.

Examples

RuleMeaning
HashHMACSHA256("MySecret",DWVariableToHash)Will return a hash of the given value, using MySecret as the key.

See Also

The function HashHMACSHA1 is also available.

This function relates to the Send HTTP Request task.

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

For more information on cryptography please see Overview of encryption, digital signatures, and hash algorithms in .NET (MSDN article).