HMACBinary

Computes the MD5, RIPEMD160, SHA1, SHA256, SHA384, or SHA512 Hash-based Message Authentication (HMAC) of a binary input in SQL Server

  • Free Function
  • SQL Server Compatibility: 2008, 2012, 2014, 2016, 2017

Syntax:

SELECT SQLHTTP.net.HMACBinary ( @Algorithm, @BinaryToHash, @HashKey )

Arguments:

Name Type Description
@Algorithm varchar(20) One of the following Algorithm: MD5, RIPEMD160, SHA1, SHA256, SHA384, or SHA512
@BinaryToHash varbinary(MAX) Binary data to hash
@HashKey varchar(MAX) The key to use in the hash algorithm

Return Type:

varbinary(MAX)

Remarks:

We provide two distinct functions: HMACBinary and HMACString

Sample Usage:

See Also: