Function glib::compute_checksum_for_bytes

source ·
pub fn compute_checksum_for_bytes(
    checksum_type: ChecksumType,
    data: &Bytes,
) -> Option<GString>
Expand description

Computes the checksum for a binary @data. This is a convenience wrapper for g_checksum_new(), g_checksum_get_string() and g_checksum_free().

The hexadecimal string returned will be in lower case.


a #GChecksumType


binary blob to compute the digest of


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