1gnutls_crypto_register_cipher(3)    gnutls    gnutls_crypto_register_cipher(3)
2
3
4

NAME

6       gnutls_crypto_register_cipher - API function
7

SYNOPSIS

9       #include <gnutls/crypto.h>
10
11       int  gnutls_crypto_register_cipher(gnutls_cipher_algorithm_t algorithm,
12       int priority, gnutls_cipher_init_func  init,  gnutls_cipher_setkey_func
13       setkey,   gnutls_cipher_setiv_func   setiv,  gnutls_cipher_encrypt_func
14       encrypt, gnutls_cipher_decrypt_func decrypt,  gnutls_cipher_deinit_func
15       deinit);
16

ARGUMENTS

18       gnutls_cipher_algorithm_t algorithm
19                   is the gnutls algorithm identifier
20
21       int priority
22                   is the priority of the algorithm
23
24       gnutls_cipher_init_func init
25                   A function which initializes the cipher
26
27       gnutls_cipher_setkey_func setkey
28                   A function which sets the key of the cipher
29
30       gnutls_cipher_setiv_func setiv
31                   A function which sets the nonce/IV of the cipher (non-AEAD)
32
33       gnutls_cipher_encrypt_func encrypt
34                   A function which performs encryption (non-AEAD)
35
36       gnutls_cipher_decrypt_func decrypt
37                   A function which performs decryption (non-AEAD)
38
39       gnutls_cipher_deinit_func deinit
40                   A function which deinitializes the cipher
41

DESCRIPTION

43       This  function  will  register a cipher algorithm to be used by gnutls.
44       Any algorithm registered will override the included algorithms  and  by
45       convention  kernel  implemented  algorithms  have  priority  of  90 and
46       CPU-assisted of 80.  The algorithm with the  lowest  priority  will  be
47       used by gnutls.
48
49       In   the   case   the   registered  init  or  setkey  functions  return
50       GNUTLS_E_NEED_FALLBACK, GnuTLS will attempt to use the next in priority
51       registered cipher.
52
53       The  functions  which are marked as non-AEAD they are not required when
54       registering a cipher to be used with the new  AEAD  API  introduced  in
55       GnuTLS 3.4.0. Internally GnuTLS uses the new AEAD API.
56

RETURNS

58       GNUTLS_E_SUCCESS on success, otherwise a negative error code.
59

SINCE

61       3.4.0
62

REPORTING BUGS

64       Report bugs to <bugs@gnutls.org>.
65       Home page: https://www.gnutls.org
66
67
69       Copyright © 2001- Free Software Foundation, Inc., and others.
70       Copying  and  distribution  of this file, with or without modification,
71       are permitted in any medium  without  royalty  provided  the  copyright
72       notice and this notice are preserved.
73

SEE ALSO

75       The  full  documentation  for gnutls is maintained as a Texinfo manual.
76       If the /usr/share/doc/gnutls/ directory does not contain the HTML  form
77       visit
78
79       https://www.gnutls.org/manual/
80
81gnutls                              3.6.15    gnutls_crypto_register_cipher(3)
Impressum