HMACString

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

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

Syntax:

SELECT SQLHTTP.net.HMACString ( @Algorithm, @StringToHash, @HashKey )

Arguments:

Name Type Description
@Algorithm varchar(20) One of the following Algorithms: MD5, RIPEMD160, SHA1, SHA256, SHA384, or SHA512
@StringToHash varchar(MAX) string 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: