From: Stefan Walter Date: Wed, 11 Mar 2009 15:47:36 +0000 (+0000) Subject: Document and guarantee hex digests will be returned in lower case. X-Git-Tag: GLIB_2_20_0~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a4d3d1f3c87206d574dd38ffbc0176b8bf4d62e0;p=platform%2Fupstream%2Fglib.git Document and guarantee hex digests will be returned in lower case. See bug #574019 svn path=/trunk/; revision=7971 --- diff --git a/ChangeLog b/ChangeLog index 7b02ed0..d72e50f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-03-11 Stef Walter + + * glib/gchecksum.c: Document and guarantee hex digests will + be returned in lower case. Fixes bug #574019 + 2009-03-02 Matthias Clasen * configure.in: Bump version diff --git a/glib/gchecksum.c b/glib/gchecksum.c index 711370b..1611193 100644 --- a/glib/gchecksum.c +++ b/glib/gchecksum.c @@ -31,6 +31,7 @@ #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 */ static const gchar hex_digits[] = "0123456789abcdef"; #define MD5_DATASIZE 64 @@ -1255,6 +1256,8 @@ g_checksum_update (GChecksum *checksum, * * Once this function has been called the #GChecksum can no longer be * updated with g_checksum_update(). + * + * The hexadecimal characters will be lower case. * * Return value: the hexadecimal representation of the checksum. The * returned string is owned by the checksum and should not be modified @@ -1373,6 +1376,8 @@ g_checksum_get_digest (GChecksum *checksum, * Computes the checksum for a binary @data of @length. This is a * convenience wrapper for g_checksum_new(), g_checksum_get_string() * and g_checksum_free(). + * + * The hexadecimal string returned will be in lower case. * * Return value: the digest of the binary data as a string in hexadecimal. * The returned string should be freed with g_free() when done using it. @@ -1408,6 +1413,8 @@ g_compute_checksum_for_data (GChecksumType checksum_type, * @length: the length of the string, or -1 if the string is null-terminated. * * Computes the checksum of a string. + * + * The hexadecimal string returned will be in lower case. * * Return value: the checksum as a hexadecimal string. The returned string * should be freed with g_free() when done using it.