Function glib::compute_hmac_for_string[][src]

pub fn compute_hmac_for_string(
    digest_type: ChecksumType,
    key: &[u8],
    str: &str
) -> GString
Expand description

Computes the HMAC for a string.

The hexadecimal string returned will be in lower case.

digest_type

a ChecksumType to use for the HMAC

key

the key to use in the HMAC

str

the string to compute the HMAC for

length

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

Returns

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