Skip to content

GetHmacHash Method ​

Definition ​

  • Namespace: JASE
  • Assembly: JASE.dll

Overloads ​

NameDescription
byte[] GetHmacHash(byte[] input, byte[] key, HmacImplementation? hmac = null)Computes an HMAC over the given bytes using the requested HMAC algorithm and key bytes.
byte[] GetHmacHash(byte[] input, string key, HmacImplementation? hmac = null, Encoding encoding = null)Computes an HMAC over the given bytes using the requested HMAC algorithm and key string.
byte[] GetHmacHash(string input, string key, HmacImplementation? hmac = null, Encoding encoding = null)Computes an HMAC over the given string using the requested HMAC algorithm and key.

byte[] GetHmacHash(byte[] input, byte[] key, HmacImplementation? hmac = null) ​

csharp
byte[] GetHmacHash(byte[] input, byte[] key, HmacImplementation? hmac = null)

Computes an HMAC over the given bytes using the requested HMAC algorithm and key bytes.

byte[] GetHmacHash(byte[] input, string key, HmacImplementation? hmac = null, Encoding encoding = null) ​

csharp
byte[] GetHmacHash(byte[] input, string key, HmacImplementation? hmac = null, Encoding encoding = null)

Computes an HMAC over the given bytes using the requested HMAC algorithm and key string.

byte[] GetHmacHash(string input, string key, HmacImplementation? hmac = null, Encoding encoding = null) ​

csharp
byte[] GetHmacHash(string input, string key, HmacImplementation? hmac = null, Encoding encoding = null)

Computes an HMAC over the given string using the requested HMAC algorithm and key.

Parameters ​

NameDescription
encodingThe text encoding used to convert the input and key to bytes. Defaults to UTF-8 when null.
hmacThe HMAC implementation to use. Defaults to DefaultHmac if null.
inputThe input text to authenticate.
keyThe secret key used to compute the HMAC.

Returns ​

The computed HMAC bytes.