File indexing completed on 2026-05-06 08:41:17
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #ifndef __G_HMAC_H__
0022 #define __G_HMAC_H__
0023
0024 #if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
0025 #error "Only <glib.h> can be included directly."
0026 #endif
0027
0028 #include <glib/gtypes.h>
0029 #include "gchecksum.h"
0030
0031 G_BEGIN_DECLS
0032
0033 typedef struct _GHmac GHmac;
0034
0035 GLIB_AVAILABLE_IN_2_30
0036 GHmac * g_hmac_new (GChecksumType digest_type,
0037 const guchar *key,
0038 gsize key_len);
0039 GLIB_AVAILABLE_IN_2_30
0040 GHmac * g_hmac_copy (const GHmac *hmac);
0041 GLIB_AVAILABLE_IN_2_30
0042 GHmac * g_hmac_ref (GHmac *hmac);
0043 GLIB_AVAILABLE_IN_2_30
0044 void g_hmac_unref (GHmac *hmac);
0045 GLIB_AVAILABLE_IN_2_30
0046 void g_hmac_update (GHmac *hmac,
0047 const guchar *data,
0048 gssize length);
0049 GLIB_AVAILABLE_IN_2_30
0050 const gchar * g_hmac_get_string (GHmac *hmac);
0051 GLIB_AVAILABLE_IN_2_30
0052 void g_hmac_get_digest (GHmac *hmac,
0053 guint8 *buffer,
0054 gsize *digest_len);
0055
0056 GLIB_AVAILABLE_IN_2_30
0057 gchar *g_compute_hmac_for_data (GChecksumType digest_type,
0058 const guchar *key,
0059 gsize key_len,
0060 const guchar *data,
0061 gsize length);
0062 GLIB_AVAILABLE_IN_2_30
0063 gchar *g_compute_hmac_for_string (GChecksumType digest_type,
0064 const guchar *key,
0065 gsize key_len,
0066 const gchar *str,
0067 gssize length);
0068 GLIB_AVAILABLE_IN_2_50
0069 gchar *g_compute_hmac_for_bytes (GChecksumType digest_type,
0070 GBytes *key,
0071 GBytes *data);
0072
0073
0074 G_END_DECLS
0075
0076 #endif