diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2013-06-10 19:09:09 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2013-06-10 19:09:09 +0200 |
commit | 4bf5b932ca96ebb42d918ad5d09fc595966e1d5a (patch) | |
tree | 90081703462b8600500d8fdaae8b77e2af3dc3af | |
parent | 53fa58d3661a61607a9f973fd1ea16d22a987d19 (diff) | |
download | gnutls-4bf5b932ca96ebb42d918ad5d09fc595966e1d5a.tar.gz |
Added gnutls_cipher_get_tag_size().
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | lib/algorithms/ciphers.c | 18 | ||||
-rw-r--r-- | lib/includes/gnutls/crypto.h | 2 | ||||
-rw-r--r-- | lib/libgnutls.map | 1 |
4 files changed, 18 insertions, 4 deletions
@@ -9,6 +9,7 @@ subsystems. ** API and ABI modifications: gnutls_certificate_set_trust_list: Added +gnutls_cipher_get_tag_size: Added * Version 3.2.1 (released 2013-06-01) diff --git a/lib/algorithms/ciphers.c b/lib/algorithms/ciphers.c index 022702efb3..6b97a53332 100644 --- a/lib/algorithms/ciphers.c +++ b/lib/algorithms/ciphers.c @@ -94,9 +94,7 @@ const cipher_entry_st* cipher_to_entry(gnutls_cipher_algorithm_t c) * gnutls_cipher_get_block_size: * @algorithm: is an encryption algorithm * - * Get block size for encryption algorithm. - * - * Returns: block size for encryption algorithm. + * Returns: the block size of the encryption algorithm. * * Since: 2.10.0 **/ @@ -110,6 +108,20 @@ gnutls_cipher_get_block_size (gnutls_cipher_algorithm_t algorithm) } /** + * gnutls_cipher_get_tag_size: + * @algorithm: is an encryption algorithm + * + * Returns: the tag size of the authenticated encryption algorithm. + * + * Since: 3.2.2 + **/ +int +gnutls_cipher_get_tag_size (gnutls_cipher_algorithm_t algorithm) +{ + return _gnutls_cipher_get_tag_size(cipher_to_entry(algorithm)); +} + +/** * gnutls_cipher_get_iv_size: * @algorithm: is an encryption algorithm * diff --git a/lib/includes/gnutls/crypto.h b/lib/includes/gnutls/crypto.h index ff402fc9ce..44d77f9339 100644 --- a/lib/includes/gnutls/crypto.h +++ b/lib/includes/gnutls/crypto.h @@ -53,7 +53,7 @@ extern "C" void gnutls_cipher_deinit (gnutls_cipher_hd_t handle); int gnutls_cipher_get_block_size (gnutls_cipher_algorithm_t algorithm); int gnutls_cipher_get_iv_size (gnutls_cipher_algorithm_t algorithm); - + int gnutls_cipher_get_tag_size (gnutls_cipher_algorithm_t algorithm); typedef struct hash_hd_st *gnutls_hash_hd_t; typedef struct hmac_hd_st *gnutls_hmac_hd_t; diff --git a/lib/libgnutls.map b/lib/libgnutls.map index f7a41db334..5bd384c72f 100644 --- a/lib/libgnutls.map +++ b/lib/libgnutls.map @@ -912,6 +912,7 @@ GNUTLS_3_1_0 { gnutls_alpn_set_protocols; gnutls_session_set_id; gnutls_certificate_set_trust_list; + gnutls_cipher_get_tag_size; } GNUTLS_3_0_0; GNUTLS_PRIVATE { |