GLib.compute_hmac_for_data

function compute_hmac_for_data(digest_type: GLib.ChecksumType, key: ByteArray, data: Number(guint8), length: Number(gsize)): String {
    // Gjs wrapper for g_compute_hmac_for_data()
}
  

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

The hexadecimal string returned will be in lower case.

Since 2.30

digest_type

a GLib.ChecksumType to use for the HMAC

key

the key to use in the HMAC

data

binary blob to compute the HMAC of

length

length of data

Returns

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