Function glib::functions::compute_checksum_for_string[][src]

pub fn compute_checksum_for_string(
    checksum_type: ChecksumType,
    str: &str
) -> Option<GString>
Expand description

Computes the checksum of a string.

The hexadecimal string returned will be in lower case.

checksum_type

a ChecksumType

str

the string to compute the checksum of

length

the length of the string, or -1 if the string is null-terminated.

Returns

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