1gnutls_aead_cipher_encrypt(3) gnutls gnutls_aead_cipher_encrypt(3)
2
3
4
6 gnutls_aead_cipher_encrypt - API function
7
9 #include <gnutls/crypto.h>
10
11 int gnutls_aead_cipher_encrypt(gnutls_aead_cipher_hd_t handle, const
12 void * nonce, size_t nonce_len, const void * auth, size_t auth_len,
13 size_t tag_size, const void * ptext, size_t ptext_len, void * ctext,
14 size_t * ctext_len);
15
17 gnutls_aead_cipher_hd_t handle
18 is a gnutls_aead_cipher_hd_t type.
19
20 const void * nonce
21 the nonce to set
22
23 size_t nonce_len
24 The length of the nonce
25
26 const void * auth
27 additional data to be authenticated
28
29 size_t auth_len
30 The length of the data
31
32 size_t tag_size
33 The size of the tag to use (use zero for the default)
34
35 const void * ptext
36 the data to encrypt
37
38 size_t ptext_len
39 The length of data to encrypt
40
41 void * ctext
42 the encrypted data including authentication tag
43
44 size_t * ctext_len
45 the length of encrypted data (initially must hold the maxi‐
46 mum available size, including space for tag)
47
49 This function will encrypt the given data using the algorithm specified
50 by the context. The output data will contain the authentication tag.
51
53 Zero or a negative error code on error.
54
56 3.4.0
57
59 Report bugs to <bugs@gnutls.org>.
60 Home page: https://www.gnutls.org
61
62
64 Copyright © 2001-2019 Free Software Foundation, Inc., and others.
65 Copying and distribution of this file, with or without modification,
66 are permitted in any medium without royalty provided the copyright
67 notice and this notice are preserved.
68
70 The full documentation for gnutls is maintained as a Texinfo manual.
71 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
72 visit
73
74 https://www.gnutls.org/manual/
75
76gnutls 3.6.8 gnutls_aead_cipher_encrypt(3)