From 12558db3f0e1186eb4184da61841060f7a71c54d Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Wed, 27 Feb 2019 09:29:04 +0100 Subject: 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 --- lib/algorithms/ciphers.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/algorithms') 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. -- cgit v1.2.1