Function glib::compute_hmac_for_bytes[][src]

pub fn compute_hmac_for_bytes(
    digest_type: ChecksumType,
    key: &Bytes,
    data: &Bytes
) -> GString
This is supported on crate feature v2_50 only.
Expand description

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.


a ChecksumType to use for the HMAC


the key to use in the HMAC


binary blob to compute the HMAC of


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