GLib.compute_checksum_for_data

function compute_checksum_for_data(checksum_type: GLib.ChecksumType, data: ByteArray): String {
    // Gjs wrapper for g_compute_checksum_for_data()
}
  

Computes the checksum for a binary data of length. This is a convenience wrapper for GLib.Checksum.new, GLib.Checksum.prototype.get_string and GLib.Checksum.prototype.free.

The hexadecimal string returned will be in lower case.

Since 2.16

checksum_type

a GLib.ChecksumType

data

binary blob to compute the digest of

Returns

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