Hmac.computeHmacForString

Computes the HMAC for a string.

The hexadecimal string returned will be in lower case.

class Hmac
static
string
computeHmacForString
(,
string key
,
string str
,
ptrdiff_t length
)

Parameters

digestType GChecksumType

a #GChecksumType to use for the HMAC

key string

the key to use in the HMAC

str string

the string to compute the HMAC for

length ptrdiff_t

the length of the string, or -1 if the string is nul-terminated

Return: the HMAC as a hexadecimal string. The returned string should be freed with g_free() when done using it.

Meta

Since

2.30