From 320235dd678e6425ef2e8117067ea6a93bca2c25 Mon Sep 17 00:00:00 2001 From: Dariusz Michaluk Date: Wed, 11 May 2016 09:31:30 +0200 Subject: [PATCH] [FIX] ECB mode does not use an IV, so IV can be YACA_KEY_NULL. Change-Id: I64dbb66346176da764009ffb549451fffa5a5435 --- src/simple.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/simple.c b/src/simple.c index ff7f19e..bb8eeec 100644 --- a/src/simple.c +++ b/src/simple.c @@ -94,7 +94,7 @@ API int yaca_encrypt(yaca_enc_algo_e algo, size_t out_len, lcipher_len, written; if (plain == NULL || plain_len == 0 || cipher == NULL || cipher_len == NULL || - sym_key == YACA_KEY_NULL || iv == YACA_KEY_NULL) + sym_key == YACA_KEY_NULL) return YACA_ERROR_INVALID_ARGUMENT; if (plain_len > INT_MAX) /* TODO: this is because get_output_length returns signed int - perhaps we should change that */ @@ -171,7 +171,7 @@ API int yaca_decrypt(yaca_enc_algo_e algo, size_t out_len, lplain_len, written; if (cipher == NULL || cipher_len == 0 || plain == NULL || plain_len == NULL || - sym_key == YACA_KEY_NULL || iv == YACA_KEY_NULL) + sym_key == YACA_KEY_NULL) return YACA_ERROR_INVALID_ARGUMENT; if (cipher_len > INT_MAX) /* TODO: this is because get_output_length returns signed int - perhaps we should change that */ -- 2.7.4