hmac: Add support for SHA-512 in GHmac
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Wed, 19 Feb 2014 18:02:37 +0000 (18:02 +0000)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Wed, 16 Apr 2014 15:20:46 +0000 (16:20 +0100)
commit7a86a6690a767b48379c9233049a6a9d2a21a86e
tree107bd9af9fe58be7755afcdfbd6e27afe25f25cd
parentd93458d97d74ef12a08de20c1f27ea1cfa54447f
hmac: Add support for SHA-512 in GHmac

The block size wasn’t configured before, so calling g_hmac_new() with
G_CHECKSUM_SHA512 would hit a g_assert_not_reached() and explode.

Implement G_CHECKSUM_SHA512 and add unit tests for HMACs with SHA-256
and SHA-512 using the test vectors from RFC 4868.

https://bugzilla.gnome.org/show_bug.cgi?id=724741
glib/ghmac.c
glib/tests/hmac.c