Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
ghmac.h
Go to the documentation of this file.
1/* ghmac.h - secure data hashing
2 *
3 * Copyright (C) 2011 Stef Walter <stefw@collabora.co.uk>
4 *
5 * SPDX-License-Identifier: LGPL-2.1-or-later
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this library; if not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef __G_HMAC_H__
22#define __G_HMAC_H__
23
24#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
25#error "Only <glib.h> can be included directly."
26#endif
27
28#include <glib/gtypes.h>
29#include "gchecksum.h"
30
32
33typedef struct _GHmac GHmac;
34
37 const guchar *key,
38 gsize key_len);
40GHmac * g_hmac_copy (const GHmac *hmac);
44void g_hmac_unref (GHmac *hmac);
46void g_hmac_update (GHmac *hmac,
47 const guchar *data,
48 gssize length);
53 guint8 *buffer,
54 gsize *digest_len);
55
58 const guchar *key,
59 gsize key_len,
60 const guchar *data,
61 gsize length);
64 const guchar *key,
65 gsize key_len,
66 const gchar *str,
67 gssize length);
70 GBytes *key,
71 GBytes *data);
72
73
75
76#endif /* __G_CHECKSUM_H__ */
typedefG_BEGIN_DECLS struct _GBytes GBytes
Definition garray.h:38
GChecksumType
Definition gchecksum.h:49
GLIB_AVAILABLE_IN_2_30 void g_hmac_unref(GHmac *hmac)
GLIB_AVAILABLE_IN_2_50 gchar * g_compute_hmac_for_bytes(GChecksumType digest_type, GBytes *key, GBytes *data)
GLIB_AVAILABLE_IN_2_30 void g_hmac_update(GHmac *hmac, const guchar *data, gssize length)
GLIB_AVAILABLE_IN_2_30 GHmac * g_hmac_new(GChecksumType digest_type, const guchar *key, gsize key_len)
GLIB_AVAILABLE_IN_2_30 GHmac * g_hmac_copy(const GHmac *hmac)
typedefG_BEGIN_DECLS struct _GHmac GHmac
Definition ghmac.h:33
GLIB_AVAILABLE_IN_2_30 gchar * g_compute_hmac_for_string(GChecksumType digest_type, const guchar *key, gsize key_len, const gchar *str, gssize length)
GLIB_AVAILABLE_IN_2_30 GHmac * g_hmac_ref(GHmac *hmac)
GLIB_AVAILABLE_IN_2_30 gchar * g_compute_hmac_for_data(GChecksumType digest_type, const guchar *key, gsize key_len, const guchar *data, gsize length)
GLIB_AVAILABLE_IN_2_30 void g_hmac_get_digest(GHmac *hmac, guint8 *buffer, gsize *digest_len)
GLIB_AVAILABLE_IN_2_30 const gchar * g_hmac_get_string(GHmac *hmac)
#define GLIB_AVAILABLE_IN_2_30
#define GLIB_AVAILABLE_IN_2_50
signed long gssize
Definition glibconfig.h:82
unsigned char guint8
Definition glibconfig.h:46
unsigned long gsize
Definition glibconfig.h:83
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
unsigned char guchar
Definition gtypes.h:58
G_BEGIN_DECLS typedef char gchar
Definition gtypes.h:52