summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2019-02-27 09:29:04 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2019-03-01 11:05:30 +0100
commit12558db3f0e1186eb4184da61841060f7a71c54d (patch)
treef83253a2ca3ebbe59461657b6dba4b8c563d6f4a
parent26e71744ee63abbff4d9ee5947d30be86972712e (diff)
downloadgnutls-12558db3f0e1186eb4184da61841060f7a71c54d.tar.gz
Improve documentation for gnutls_cipher_get_iv_size
This clarifies what is returned and what is to be expected on algorithms with variable IV sizes. Resolves: #717 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r--lib/algorithms/ciphers.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/algorithms/ciphers.c b/lib/algorithms/ciphers.c
index 1a8704be25..e5bd7dfcd3 100644
--- a/lib/algorithms/ciphers.c
+++ b/lib/algorithms/ciphers.c
@@ -341,7 +341,9 @@ unsigned gnutls_cipher_get_tag_size(gnutls_cipher_algorithm_t algorithm)
* gnutls_cipher_get_iv_size:
* @algorithm: is an encryption algorithm
*
- * Get block size for encryption algorithm.
+ * This function returns the size of the initialization vector (IV) for the
+ * provided algorithm. For algorithms with variable size IV (e.g., AES-CCM),
+ * the returned size will be the one used by TLS.
*
* Returns: block size for encryption algorithm.
*
@@ -358,7 +360,7 @@ unsigned gnutls_cipher_get_iv_size(gnutls_cipher_algorithm_t algorithm)
* gnutls_cipher_get_key_size:
* @algorithm: is an encryption algorithm
*
- * Get key size for cipher.
+ * This function returns the key size of the provided algorithm.
*
* Returns: length (in bytes) of the given cipher's key size, or 0 if
* the given cipher is invalid.