summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Flarsheim <philip.flarsheim@gmail.com>2012-05-04 20:33:10 -0700
committerJürg Billeter <j@bitron.ch>2012-06-23 17:18:55 +0200
commit7b3ccfb22725899a0c8c91939ed5f24e8c031d14 (patch)
tree439d0815b78e37733a443902cdca029124ee5cba
parentf66cabc7a81571c8ad29ff8dee7d911beb216a2b (diff)
downloadvala-7b3ccfb22725899a0c8c91939ed5f24e8c031d14.tar.gz
glib-2.0: add Hmac bindings
Fixes bug 670243.
-rw-r--r--vapi/glib-2.0.vapi16
1 files changed, 16 insertions, 0 deletions
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index df6ebf32e..cd4aa17d9 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -2368,6 +2368,22 @@ namespace GLib {
public static string compute_for_string (ChecksumType checksum_type, string str, size_t length = -1);
}
+ /* Secure HMAC Digests */
+
+ [Compact]
+ [CCode (ref_function = "g_hmac_ref", unref_function = "g_hmac_unref")]
+ public class Hmac {
+ public Hmac (ChecksumType digest_type, [CCode (array_length_type = "gsize")] uint8[] key);
+ public Hmac copy ();
+ public void update ([CCode (array_length_type = "gssize")] uint8[] data, size_t length);
+ public unowned string get_string ();
+ public void get_digest ([CCode (array_length = false)] uint8[] buffer, ref size_t digest_len);
+ [CCode (cname = "g_compute_hmac_for_data")]
+ public static string compute_for_data (ChecksumType checksum_type, uint8[] key, uint8[] data);
+ [CCode (cname = "g_compute_hmac_for_string")]
+ public static string compute_for_string (ChecksumType checksum_type, uint8[] key, string str, size_t length = -1);
+ }
+
/* Date and Time Functions */
[CCode (has_type_id = false)]