Add GChecksum public API.
authorEmmanuele Bassi <ebassi@gnome.org>
Tue, 4 Dec 2007 16:34:00 +0000 (16:34 +0000)
committerEmmanuele Bassi <ebassi@src.gnome.org>
Tue, 4 Dec 2007 16:34:00 +0000 (16:34 +0000)
2007-12-04  Emmanuele Bassi  <ebassi@gnome.org>

* glib/glib-sections.txt: Add GChecksum public API.

* glib/tmpl/checksum.sgml:
* glib/glib-docs.sgml: Add the checksums API page.

svn path=/trunk/; revision=6044

docs/reference/ChangeLog
docs/reference/glib/glib-docs.sgml
docs/reference/glib/glib-sections.txt
docs/reference/glib/tmpl/checksum.sgml [new file with mode: 0644]

index f6fd996..95ae07e 100644 (file)
@@ -1,3 +1,10 @@
+2007-12-04  Emmanuele Bassi  <ebassi@gnome.org>
+
+       * glib/glib-sections.txt: Add GChecksum public API.
+
+       * glib/tmpl/checksum.sgml:
+       * glib/glib-docs.sgml: Add the checksums API page.
+
 2007-11-29  Behdad Esfahbod  <behdad@gnome.org>
 
        Bug 500361 – Improve docs for g_array_free() and g_ptr_array_free()
index d4f9200..4338926 100644 (file)
@@ -60,6 +60,7 @@
 <!ENTITY glib-Keyfile SYSTEM "xml/keyfile.xml">
 <!ENTITY glib-Bookmarkfile SYSTEM "xml/bookmarkfile.xml">
 <!ENTITY glib-Base64 SYSTEM "xml/base64.xml">
+<!ENTITY glib-Checksum SYSTEM "xml/checksum.xml">
 <!ENTITY glib-i18n SYSTEM "xml/i18n.xml">
 <!ENTITY glib-Regex SYSTEM "xml/gregex.xml">
 <!ENTITY glib-Version SYSTEM "xml/version.xml">
@@ -142,6 +143,7 @@ synchronize their operation.
     &glib-Character-Set-Conversion;
     &glib-Unicode-Manipulation;
     &glib-Base64;
+    &glib-Checksum;
     &glib-i18n;
     &glib-Date-and-Time-Functions;
     &glib-Random-Numbers;   
index a86f3ca..e54f028 100644 (file)
@@ -2518,3 +2518,19 @@ g_uri_get_scheme
 g_uri_unescape_segment
 g_uri_unescape_string
 </SECTION>
+
+<SECTION>
+<TITLE>Data Checksums</TITLE>
+<FILE>checksum</FILE>
+GChecksumType
+GChecksum
+g_checksum_new
+g_checksum_copy
+g_checksum_free
+g_checksum_update
+g_checksum_get_string
+g_checksum_get_digest
+<SUBSECTION>
+g_compute_checksum_for_data
+g_compute_checksum_for_string
+</SECTION>
diff --git a/docs/reference/glib/tmpl/checksum.sgml b/docs/reference/glib/tmpl/checksum.sgml
new file mode 100644 (file)
index 0000000..7d45377
--- /dev/null
@@ -0,0 +1,128 @@
+<!-- ##### 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: 
+
+<!-- ##### 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_update ##### -->
+<para>
+
+</para>
+
+@checksum: 
+@data: 
+@length: 
+
+
+<!-- ##### FUNCTION g_checksum_get_string ##### -->
+<para>
+
+</para>
+
+@checksum: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_checksum_get_digest ##### -->
+<para>
+
+</para>
+
+@checksum: 
+@digest: 
+@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: 
+
+