pub fn compute_checksum_for_data(
    checksum_type: ChecksumType,
    data: &[u8]
) -> Option<GString>
Expand description

Computes the checksum for a binary data of length. This is a convenience wrapper for Checksum::new(), Checksum::string() and g_checksum_free().

The hexadecimal string returned will be in lower case.

checksum_type

a ChecksumType

data

binary blob to compute the digest of

Returns

the digest of the binary data as a string in hexadecimal, or None if Checksum::new() fails for checksum_type. The returned string should be freed with g_free() when done using it.