compute_for_string


Description:

[ Version ( since = "2.30" ) ]
[ CCode ( cname = "g_compute_hmac_for_string" ) ]
public static string compute_for_string (ChecksumType checksum_type, uint8[] key, string str, size_t length = -1)

Computes the HMAC for a string.

The hexadecimal string returned will be in lower case.

Parameters:

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

digest_type

a ChecksumType to use for the HMAC

key_len

the length of the key

Returns:

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