computeChecksumForString

fun computeChecksumForString(checksumType: ChecksumType, str: String, length: Long): String

Computes the checksum of a string.

The hexadecimal string returned will be in lower case.

Return

the checksum as a hexadecimal string, or null if g_checksum_new() fails for @checksum_type. The returned string should be freed with g_free() when done using it.

Since

2.16

Parameters

checksumType

a #GChecksumType

str

the string to compute the checksum of

length

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