# compute_for_data

## Description:

[ Version ( since = "2.30" ) ]

[ CCode ( cname = "g_compute_hmac_for_data" ) ]

public static string

[ CCode ( cname = "g_compute_hmac_for_data" ) ]

public static string

**compute_for_data**(ChecksumType checksum_type, uint8[] key, uint8[] data)Computes the HMAC for a binary `data`

of `data.length`

.

This is a convenience wrapper for Hmac,
get_string and `g_hmac_unref`

.

The hexadecimal string returned will be in lower case.

## Parameters:

key |
the key to use in the HMAC |

data |
binary blob to compute the HMAC of |

digest_type |
a ChecksumType to use for the HMAC |

key_len |
the length of the key |

length |
length of |

## Returns:

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