1gnutls_hmac_init(3) gnutls gnutls_hmac_init(3)
2
3
4
6 gnutls_hmac_init - API function
7
9 #include <gnutls/crypto.h>
10
11 int gnutls_hmac_init(gnutls_hmac_hd_t * dig, gnutls_mac_algorithm_t
12 algorithm, const void * key, size_t keylen);
13
15 gnutls_hmac_hd_t * dig
16 is a gnutls_hmac_hd_t type
17
18 gnutls_mac_algorithm_t algorithm
19 the HMAC algorithm to use
20
21 const void * key
22 the key to be used for encryption
23
24 size_t keylen
25 the length of the key
26
28 This function will initialize an context that can be used to produce a
29 Message Authentication Code (MAC) of data. This will effectively use
30 the current crypto backend in use by gnutls or the cryptographic accel‐
31 erator in use.
32
33 Note that despite the name of this function, it can be used for other
34 MAC algorithms than HMAC.
35
37 Zero or a negative error code on error.
38
40 2.10.0
41
43 Report bugs to <bugs@gnutls.org>.
44 Home page: https://www.gnutls.org
45
46
48 Copyright © 2001-2019 Free Software Foundation, Inc., and others.
49 Copying and distribution of this file, with or without modification,
50 are permitted in any medium without royalty provided the copyright
51 notice and this notice are preserved.
52
54 The full documentation for gnutls is maintained as a Texinfo manual.
55 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
56 visit
57
58 https://www.gnutls.org/manual/
59
60gnutls 3.6.8 gnutls_hmac_init(3)