1gnutls_cipher_encrypt3(3)           gnutls           gnutls_cipher_encrypt3(3)
2
3
4

NAME

6       gnutls_cipher_encrypt3 - API function
7

SYNOPSIS

9       #include <gnutls/crypto.h>
10
11       int  gnutls_cipher_encrypt3(gnutls_cipher_hd_t  handle,  const  void  *
12       ptext, size_t ptext_len, void * ctext,  size_t  *  ctext_len,  unsigned
13       flags);
14

ARGUMENTS

16       gnutls_cipher_hd_t handle
17                   is a gnutls_cipher_hd_t type
18
19       const void * ptext
20                   the data to encrypt
21
22       size_t ptext_len
23                   the length of data to encrypt
24
25       void * ctext
26                   the encrypted data
27
28       size_t * ctext_len
29                   the length of encrypted data (initially must hold the maxi‐
30                   mum available size)
31
32       unsigned flags
33                   flags for padding
34

DESCRIPTION

36       This function will encrypt the given data using the algorithm specified
37       by  the  context. For block ciphers,  ptext_len is typically a multiple
38       of the block size. If not, the caller can instruct the function to  pad
39       the  last  block  according  to  flags .  Currently, the only available
40       padding scheme is GNUTLS_CIPHER_PADDING_PKCS7.
41
42       If  ctext is not NULL, it must hold enough space to store resulting ci‐
43       pher text. To check the required size, this function can be called with
44       ctext set to NULL. Then  ctext_len will be updated  without  performing
45       actual encryption.
46

RETURNS

48       Zero or a negative error code on error.
49

SINCE

51       3.7.7
52

REPORTING BUGS

54       Report bugs to <bugs@gnutls.org>.
55       Home page: https://www.gnutls.org
56
57
59       Copyright © 2001- Free Software Foundation, Inc., and others.
60       Copying  and  distribution  of this file, with or without modification,
61       are permitted in any medium without royalty provided the copyright  no‐
62       tice and this notice are preserved.
63

SEE ALSO

65       The  full  documentation  for gnutls is maintained as a Texinfo manual.
66       If the /usr/share/doc/gnutls/ directory does not contain the HTML  form
67       visit
68
69       https://www.gnutls.org/manual/
70
71gnutls                               3.7.8           gnutls_cipher_encrypt3(3)
Impressum