mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 22:16:16 +01:00
GChecksum: move docs from tmpl to .c
This commit is contained in:
parent
5ee096636b
commit
fa7cafae5c
1
docs/reference/glib/tmpl/.gitignore
vendored
1
docs/reference/glib/tmpl/.gitignore
vendored
@ -1,5 +1,6 @@
|
||||
allocators.sgml
|
||||
base64.sgml
|
||||
checksum.sgml
|
||||
completion.sgml
|
||||
datasets.sgml
|
||||
datalist.sgml
|
||||
|
@ -1,145 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Data Checksums
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Computes the checksum for data
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
GLib provides a generic API for computing checksums (or "digests") for a
|
||||
sequence of arbitrary bytes, using various hashing algorithms like MD5,
|
||||
SHA-1 and SHA-256. Checksums are commonly used in various environments and
|
||||
specifications.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GLib supports incremental checksums using the GChecksum data structure, by
|
||||
calling g_checksum_update() as long as there's data 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.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Support for checksums has been added in GLib 2.16
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### ENUM GChecksumType ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@G_CHECKSUM_MD5:
|
||||
@G_CHECKSUM_SHA1:
|
||||
@G_CHECKSUM_SHA256:
|
||||
|
||||
<!-- ##### FUNCTION g_checksum_type_get_length ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@checksum_type:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### STRUCT GChecksum ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION g_checksum_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@checksum_type:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION g_checksum_copy ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@checksum:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION g_checksum_free ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@checksum:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION g_checksum_reset ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@checksum:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION g_checksum_update ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@checksum:
|
||||
@data:
|
||||
@length:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION g_checksum_get_string ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@checksum:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION g_checksum_get_digest ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@checksum:
|
||||
@buffer:
|
||||
@digest_len:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION g_compute_checksum_for_data ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@checksum_type:
|
||||
@data:
|
||||
@length:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION g_compute_checksum_for_string ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@checksum_type:
|
||||
@str:
|
||||
@length:
|
||||
@Returns:
|
||||
|
||||
|
@ -29,6 +29,28 @@
|
||||
|
||||
#include "galias.h"
|
||||
|
||||
/**
|
||||
* SECTION: checksum
|
||||
* @title: Data Checksums
|
||||
* @short_description: Computes the checksum for data
|
||||
*
|
||||
* GLib provides a generic API for computing checksums (or "digests")
|
||||
* for a sequence of arbitrary bytes, using various hashing algorithms
|
||||
* like MD5, SHA-1 and SHA-256. Checksums are commonly used in various
|
||||
* environments and specifications.
|
||||
*
|
||||
* GLib supports incremental checksums using the GChecksum data
|
||||
* structure, by calling g_checksum_update() as long as there's data
|
||||
* 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
|
||||
**/
|
||||
|
||||
#define IS_VALID_TYPE(type) ((type) >= G_CHECKSUM_MD5 && (type) <= G_CHECKSUM_SHA256)
|
||||
|
||||
/* The fact that these are lower case characters is part of the ABI */
|
||||
|
Loading…
Reference in New Issue
Block a user