]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Added gnutls_cipher_get_tag_size().
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 10 Jun 2013 17:09:09 +0000 (19:09 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 10 Jun 2013 17:09:09 +0000 (19:09 +0200)
NEWS
lib/algorithms/ciphers.c
lib/includes/gnutls/crypto.h
lib/libgnutls.map

diff --git a/NEWS b/NEWS
index a515fe42ef8afeb27165e76c007dc030f6351af3..e372571dc2ee0032af8cb48dbb8881f271701366 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -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)
index 022702efb319946863d95a6a96c84a19931df74d..6b97a5333214ff50aa1ed16fcdfe82ffb51fc2ea 100644 (file)
@@ -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
  **/
@@ -109,6 +107,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
index ff402fc9cefbec124866ef4b52ffe4db4908dc87..44d77f93392961801c5541f2ed259822f5a0da7e 100644 (file)
@@ -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;
index f7a41db334aad3b793f3448bc75898ae61723858..5bd384c72f9def888ce83acbb6fa7994eee5192e 100644 (file)
@@ -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 {