| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
@deftypefun {int} {gnutls_crypto_register_aead_cipher} (gnutls_cipher_algorithm_t @var{algorithm}, int @var{priority}, gnutls_cipher_init_func @var{init}, gnutls_cipher_setkey_func @var{setkey}, gnutls_cipher_aead_encrypt_func @var{aead_encrypt}, gnutls_cipher_aead_decrypt_func @var{aead_decrypt}, gnutls_cipher_deinit_func @var{deinit}) |
| 6 |
@var{algorithm}: is the gnutls AEAD cipher identifier |
| 7 |
|
| 8 |
@var{priority}: is the priority of the algorithm |
| 9 |
|
| 10 |
@var{init}: A function which initializes the cipher |
| 11 |
|
| 12 |
@var{setkey}: A function which sets the key of the cipher |
| 13 |
|
| 14 |
@var{aead_encrypt}: Perform the AEAD encryption |
| 15 |
|
| 16 |
@var{aead_decrypt}: Perform the AEAD decryption |
| 17 |
|
| 18 |
@var{deinit}: A function which deinitializes the cipher |
| 19 |
|
| 20 |
This function will register a cipher algorithm to be used by |
| 21 |
gnutls. Any algorithm registered will override the included |
| 22 |
algorithms and by convention kernel implemented algorithms have |
| 23 |
priority of 90 and CPU-assisted of 80. The algorithm with the lowest priority will be |
| 24 |
used by gnutls. |
| 25 |
|
| 26 |
In the case the registered init or setkey functions return @code{GNUTLS_E_NEED_FALLBACK} , |
| 27 |
GnuTLS will attempt to use the next in priority registered cipher. |
| 28 |
|
| 29 |
The functions registered will be used with the new AEAD API introduced in |
| 30 |
GnuTLS 3.4.0. Internally GnuTLS uses the new AEAD API. |
| 31 |
|
| 32 |
@strong{Deprecated:} since 3.7.0 it is no longer possible to override cipher implementation |
| 33 |
|
| 34 |
@strong{Returns:} @code{GNUTLS_E_SUCCESS} on success, otherwise a negative error code. |
| 35 |
|
| 36 |
@strong{Since:} 3.4.0 |
| 37 |
@end deftypefun |