Struct

GLibChecksum

Description

struct GChecksum {
  /* No available fields */
}

An opaque structure representing a checksumming operation.

To create a new GChecksum, use g_checksum_new(). To free a GChecksum, use g_checksum_free().

Available since:2.16

Constructors

g_checksum_new

Creates a new GChecksum, using the checksum algorithm checksum_type. If the checksum_type is not known, NULL is returned. A GChecksum can be used to compute the checksum, or digest, of an arbitrary binary blob, using different hashing algorithms.

Available since: 2.16

Functions

g_checksum_type_get_length

Gets the length in bytes of digests of type checksum_type.

Available since: 2.16

Instance methods

g_checksum_copy

Copies a GChecksum. If checksum has been closed, by calling g_checksum_get_string() or g_checksum_get_digest(), the copied checksum will be closed as well.

Available since: 2.16

g_checksum_free

Frees the memory allocated for checksum.

Available since: 2.16

g_checksum_get_digest

Gets the digest from checksum as a raw binary vector and places it into buffer. The size of the digest depends on the type of checksum.

Available since: 2.16

g_checksum_get_string

Gets the digest as a hexadecimal string.

Available since: 2.16

g_checksum_reset

Resets the state of the checksum back to its initial state.

Available since: 2.18

g_checksum_update

Feeds data into an existing GChecksum. The checksum must still be open, that is g_checksum_get_string() or g_checksum_get_digest() must not have been called on checksum.

Available since: 2.16