crypto.h: rename yaca_get_iv_length() to yaca_get_iv_bits() 66/65866/2
authorMateusz Kulikowski <m.kulikowski@samsung.com>
Wed, 13 Apr 2016 12:45:16 +0000 (14:45 +0200)
committerMateusz Kulikowski <m.kulikowski@samsung.com>
Thu, 14 Apr 2016 08:47:02 +0000 (10:47 +0200)
Function returns IV length in bits - rename it to avoid confusion.

Change-Id: I58f565e1ca96321856f099d55ec456f23be1dbe0
Signed-off-by: Mateusz Kulikowski <m.kulikowski@samsung.com>
api/yaca/crypto.h
src/crypto.c

index 66d77e6..1b9feab 100644 (file)
@@ -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);
 
 /**@}*/
 
index af73404..9081bcf 100644 (file)
@@ -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;
 }