From 7979a7584e6e0898ec68dddde6d495edad6db5c8 Mon Sep 17 00:00:00 2001 From: Mateusz Kulikowski Date: Wed, 13 Apr 2016 14:45:16 +0200 Subject: [PATCH] crypto.h: rename yaca_get_iv_length() to yaca_get_iv_bits() Function returns IV length in bits - rename it to avoid confusion. Change-Id: I58f565e1ca96321856f099d55ec456f23be1dbe0 Signed-off-by: Mateusz Kulikowski --- api/yaca/crypto.h | 10 +++++----- src/crypto.c | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/api/yaca/crypto.h b/api/yaca/crypto.h index 66d77e6..1b9feab 100644 --- a/api/yaca/crypto.h +++ b/api/yaca/crypto.h @@ -163,17 +163,17 @@ int yaca_get_output_length(const yaca_ctx_h ctx, size_t input_len); #define yaca_get_block_length(ctxa) yaca_get_output_length((ctxa), 0) /** - * @brief yaca_get_iv_length Returns the recomended/default length of the IV for a given encryption configuration. + * @brief yaca_get_iv_bits Returns the recomended/default length of the IV for a given encryption configuration. * * @param[in] algo Encryption algorithm. * @param[in] bcm Chain mode. * @param[in] key_bits Key length in bits (@see crypto_key_len_e). * - * @return negative on error (@see error.h) or the IV length. + * @return negative on error (@see error.h) or the IV length in bits. */ -int yaca_get_iv_length(yaca_enc_algo_e algo, - yaca_block_cipher_mode_e bcm, - size_t key_bits); +int yaca_get_iv_bits(yaca_enc_algo_e algo, + yaca_block_cipher_mode_e bcm, + size_t key_bits); /**@}*/ diff --git a/src/crypto.c b/src/crypto.c index af73404..9081bcf 100644 --- a/src/crypto.c +++ b/src/crypto.c @@ -108,9 +108,9 @@ API int yaca_get_output_length(const yaca_ctx_h ctx, size_t input_len) return ctx->get_output_length(ctx, input_len); } -API int yaca_get_iv_length(yaca_enc_algo_e algo, - yaca_block_cipher_mode_e bcm, - size_t key_bits) +API int yaca_get_iv_bits(yaca_enc_algo_e algo, + yaca_block_cipher_mode_e bcm, + size_t key_bits) { return YACA_ERROR_NOT_IMPLEMENTED; } -- 2.7.4