manpagez: man pages & more
info gnutls
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.1 Symmetric algorithms

The available functions to access symmetric crypto algorithms operations are shown below. The supported algorithms are the algorithms required by the TLS protocol. They are listed in Table 3.1.

int gnutls_cipher_init (gnutls_cipher_hd_t * handle, gnutls_cipher_algorithm_t cipher, const gnutls_datum_t * key, const gnutls_datum_t * iv)
int gnutls_cipher_encrypt2 (gnutls_cipher_hd_t handle, const void * text, size_t textlen, void * ciphertext, size_t ciphertextlen)
int gnutls_cipher_decrypt2 (gnutls_cipher_hd_t handle, const void * ciphertext, size_t ciphertextlen, void * text, size_t textlen)
void gnutls_cipher_set_iv (gnutls_cipher_hd_t handle, void * iv, size_t ivlen)
void gnutls_cipher_deinit (gnutls_cipher_hd_t handle)

In order to support authenticated encryption with associated data (AEAD) algorithms the following functions are provided to set the associated data and retrieve the authentication tag.

int gnutls_cipher_add_auth (gnutls_cipher_hd_t handle, const void * text, size_t text_size)
int gnutls_cipher_tag (gnutls_cipher_hd_t handle, void * tag, size_t tag_size)

This document was generated on May 31, 2014 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.