computeHmacForBytes

fnstring computeHmacForBytes(glib.types.ChecksumType digestType, glib.bytes.Bytes key, glib.bytes.Bytes data)

Computes the HMAC for a binary data. This is a convenience wrapper for [glib.hmac.Hmac.new_], [glib.hmac.Hmac.getString] and [glib.hmac.Hmac.unref].

The hexadecimal string returned will be in lower case.

Parameters

digestTypea #GChecksumType to use for the HMAC
keythe key to use in the HMAC
databinary blob to compute the HMAC of

Returns

the HMAC of the binary data as a string in hexadecimal.

The returned string should be freed with [glib.global.gfree] when done using it.