Hmac.computeHmacForData

Computes the HMAC for a binary data of length. This is a convenience wrapper for Hmac.new, Hmac.getString and Hmac.unref.

The hexadecimal string returned will be in lower case.

class Hmac
static
string
computeHmacForData

Parameters

digestType GChecksumType

a GChecksumType to use for the HMAC

key char[]

the key to use in the HMAC

data char[]

binary blob to compute the HMAC of

Return Value

Type: string

the HMAC of the binary data as a string in hexadecimal. The returned string should be freed with g_free() when done using it.

Meta

Since

2.30