mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-24 11:12:11 +01:00
docs: Move the GChecksum SECTION
Move it to the struct docs. Signed-off-by: Philip Withnall <philip@tecnocode.co.uk> Helps: #3037
This commit is contained in:
parent
9e95163a3c
commit
0fe15f9b9b
@ -33,25 +33,26 @@
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:checksum
|
* GChecksum:
|
||||||
* @title: Data Checksums
|
|
||||||
* @short_description: computes the checksum for data
|
|
||||||
*
|
*
|
||||||
* GLib provides a generic API for computing checksums (or "digests")
|
* GLib provides a generic API for computing checksums (or ‘digests’)
|
||||||
* for a sequence of arbitrary bytes, using various hashing algorithms
|
* for a sequence of arbitrary bytes, using various hashing algorithms
|
||||||
* like MD5, SHA-1 and SHA-256. Checksums are commonly used in various
|
* like MD5, SHA-1 and SHA-256. Checksums are commonly used in various
|
||||||
* environments and specifications.
|
* environments and specifications.
|
||||||
*
|
*
|
||||||
* GLib supports incremental checksums using the GChecksum data
|
* To create a new `GChecksum`, use [ctor@GLib.Checksum.new]. To free
|
||||||
* structure, by calling g_checksum_update() as long as there's data
|
* a `GChecksum`, use [method@GLib.Checksum.free].
|
||||||
* available and then using g_checksum_get_string() or
|
|
||||||
* g_checksum_get_digest() to compute the checksum and return it either
|
|
||||||
* as a string in hexadecimal form, or as a raw sequence of bytes. To
|
|
||||||
* compute the checksum for binary blobs and NUL-terminated strings in
|
|
||||||
* one go, use the convenience functions g_compute_checksum_for_data()
|
|
||||||
* and g_compute_checksum_for_string(), respectively.
|
|
||||||
*
|
*
|
||||||
* Support for checksums has been added in GLib 2.16
|
* GLib supports incremental checksums using the `GChecksum` data
|
||||||
|
* structure, by calling [method@GLib.Checksum.update] as long as there’s data
|
||||||
|
* available and then using [method@GLib.Checksum.get_string] or
|
||||||
|
* [method@GLib.Checksum.get_digest] to compute the checksum and return it
|
||||||
|
* either as a string in hexadecimal form, or as a raw sequence of bytes. To
|
||||||
|
* compute the checksum for binary blobs and nul-terminated strings in
|
||||||
|
* one go, use the convenience functions [func@GLib.compute_checksum_for_data]
|
||||||
|
* and [func@GLib.compute_checksum_for_string], respectively.
|
||||||
|
*
|
||||||
|
* Since: 2.16
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#define IS_VALID_TYPE(type) ((type) >= G_CHECKSUM_MD5 && (type) <= G_CHECKSUM_SHA384)
|
#define IS_VALID_TYPE(type) ((type) >= G_CHECKSUM_MD5 && (type) <= G_CHECKSUM_SHA384)
|
||||||
|
@ -54,16 +54,6 @@ typedef enum {
|
|||||||
G_CHECKSUM_SHA384
|
G_CHECKSUM_SHA384
|
||||||
} GChecksumType;
|
} GChecksumType;
|
||||||
|
|
||||||
/**
|
|
||||||
* GChecksum:
|
|
||||||
*
|
|
||||||
* An opaque structure representing a checksumming operation.
|
|
||||||
*
|
|
||||||
* To create a new GChecksum, use g_checksum_new(). To free
|
|
||||||
* a GChecksum, use g_checksum_free().
|
|
||||||
*
|
|
||||||
* Since: 2.16
|
|
||||||
*/
|
|
||||||
typedef struct _GChecksum GChecksum;
|
typedef struct _GChecksum GChecksum;
|
||||||
|
|
||||||
GLIB_AVAILABLE_IN_ALL
|
GLIB_AVAILABLE_IN_ALL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user