Function

GLib-2.0GLibcompute_checksum_for_stringSince 2.16

  • Computes the checksum of a string.

    The hexadecimal string returned will be in lower case.

    Parameters

    • checksum_type: ChecksumType
    • str: string

      the string to compute the checksum of

    • length: number

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

    Returns string

    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.

    2.16