From fa7cafae5cfea880a1d6cfc82b000eecd34534e1 Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Sun, 31 Jan 2010 00:05:48 -0500 Subject: [PATCH] GChecksum: move docs from tmpl to .c --- docs/reference/glib/tmpl/.gitignore | 1 + docs/reference/glib/tmpl/checksum.sgml | 145 --------------------------------- glib/gchecksum.c | 22 +++++ 3 files changed, 23 insertions(+), 145 deletions(-) delete mode 100644 docs/reference/glib/tmpl/checksum.sgml diff --git a/docs/reference/glib/tmpl/.gitignore b/docs/reference/glib/tmpl/.gitignore index 307edca..3dcf262 100644 --- a/docs/reference/glib/tmpl/.gitignore +++ b/docs/reference/glib/tmpl/.gitignore @@ -1,5 +1,6 @@ allocators.sgml base64.sgml +checksum.sgml completion.sgml datasets.sgml datalist.sgml diff --git a/docs/reference/glib/tmpl/checksum.sgml b/docs/reference/glib/tmpl/checksum.sgml deleted file mode 100644 index 81abfe9..0000000 --- a/docs/reference/glib/tmpl/checksum.sgml +++ /dev/null @@ -1,145 +0,0 @@ - -Data Checksums - - -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 - - - - - - - - - - - - - - - -@G_CHECKSUM_MD5: -@G_CHECKSUM_SHA1: -@G_CHECKSUM_SHA256: - - - - - - -@checksum_type: -@Returns: - - - - - - - - - - - - - -@checksum_type: -@Returns: - - - - - - - -@checksum: -@Returns: - - - - - - - -@checksum: - - - - - - - -@checksum: - - - - - - - -@checksum: -@data: -@length: - - - - - - - -@checksum: -@Returns: - - - - - - - -@checksum: -@buffer: -@digest_len: - - - - - - - -@checksum_type: -@data: -@length: -@Returns: - - - - - - - -@checksum_type: -@str: -@length: -@Returns: - - diff --git a/glib/gchecksum.c b/glib/gchecksum.c index 1611193..ad90727 100644 --- a/glib/gchecksum.c +++ b/glib/gchecksum.c @@ -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 */ -- 2.7.4