hmac: Implementation of HMAC in glib

This implements g_hmac_xxx() functionality using the standard checksum
functions supported by glib.

HMAC is a secure way to hash a key and a password. Many other
approaches fraught with append and prepend issues.

Includes test cases defined in relevant RFCs

https://bugzilla.gnome.org/show_bug.cgi?id=652480
This commit is contained in:
Stef Walter
2011-08-14 09:27:45 +02:00
parent d2ca14c270
commit acbcb8f7e3
9 changed files with 759 additions and 0 deletions

View File

@@ -2828,6 +2828,22 @@ g_compute_checksum_for_data
g_compute_checksum_for_string
</SECTION>
<SECTION>
<TITLE>Data HMACs</TITLE>
<FILE>hmac</FILE>
GHmac
g_hmac_new
g_hmac_copy
g_hmac_ref
g_hmac_unref
g_hmac_update
g_hmac_get_string
g_hmac_get_digest
<SUBSECTION>
g_compute_hmac_for_data
g_compute_hmac_for_string
</SECTION>
<SECTION>
<TITLE>Testing</TITLE>
<FILE>testing</FILE>