Function
GLibcompute_hmac_for_bytes
since: 2.50
Declaration [src]
gchar*
g_compute_hmac_for_bytes(
GChecksumTypedigest_type,
GBytes*key,
GBytes*data
)
Description [src]
Computes the HMAC for a binary data. This is a
convenience wrapper for g_hmac_new(), g_hmac_get_string()
and g_hmac_unref().
The hexadecimal string returned will be in lower case.
Available since: 2.50
Parameters
digest_type-
Type:
GChecksumTypeA
GChecksumTypeto use for the HMAC. key-
Type:
GBytesThe key to use in the HMAC.
The data is owned by the caller of the function. data-
Type:
GBytesBinary blob to compute the HMAC of.
The data is owned by the caller of the function.
Return value
Type: gchar*
The HMAC of the binary data as a string in hexadecimal.
The returned string should be freed with g_free() when done using it.
The caller of the function takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.