diff options
author | Krzysztof Jackiewicz <k.jackiewicz@samsung.com> | 2016-08-31 13:11:43 +0200 |
---|---|---|
committer | Krzysztof Jackiewicz <k.jackiewicz@samsung.com> | 2016-08-31 13:11:43 +0200 |
commit | 480b6484ae681ee2792e798eeeced67859b2c345 (patch) | |
tree | f2168137fc5298999df7bd6f6cf77b886f56a3ba | |
parent | 82e1e35684291484185420b5457c91bc21cdea17 (diff) | |
download | yaca-480b6484ae681ee2792e798eeeced67859b2c345.tar.gz yaca-480b6484ae681ee2792e798eeeced67859b2c345.tar.bz2 yaca-480b6484ae681ee2792e798eeeced67859b2c345.zip |
Use proper input length in encryption examplessubmit/tizen/20160901.024233accepted/tizen/wearable/20160901.065507accepted/tizen/tv/20160901.065447accepted/tizen/mobile/20160901.065440accepted/tizen/ivi/20160901.065526accepted/tizen/common/20160901.143419
Change-Id: I0a20faf41bf2b5e7670baf6100742f851b3420ff
-rw-r--r-- | examples/encrypt.c | 2 | ||||
-rw-r--r-- | examples/encrypt_aes_gcm_ccm.c | 4 | ||||
-rw-r--r-- | examples/seal.c | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/examples/encrypt.c b/examples/encrypt.c index 2d5c2c5..f152588 100644 --- a/examples/encrypt.c +++ b/examples/encrypt.c @@ -146,7 +146,7 @@ void encrypt_advanced(const yaca_encrypt_algorithm_e algo, goto exit; /* For the update */ - if (yaca_context_get_output_length(ctx, LOREM4096_SIZE, &output_len) != YACA_ERROR_NONE) + if (yaca_context_get_output_length(ctx, enc_len, &output_len) != YACA_ERROR_NONE) goto exit; /* For the finalize */ diff --git a/examples/encrypt_aes_gcm_ccm.c b/examples/encrypt_aes_gcm_ccm.c index c823d6a..64a689f 100644 --- a/examples/encrypt_aes_gcm_ccm.c +++ b/examples/encrypt_aes_gcm_ccm.c @@ -133,7 +133,7 @@ void encrypt_decrypt_aes_gcm(void) goto exit; /* For the update */ - if (yaca_context_get_output_length(ctx, LOREM4096_SIZE, &output_len) != YACA_ERROR_NONE) + if (yaca_context_get_output_length(ctx, enc_len, &output_len) != YACA_ERROR_NONE) goto exit; /* For the finalize */ @@ -286,7 +286,7 @@ void encrypt_decrypt_aes_ccm(void) goto exit; /* For the update */ - if (yaca_context_get_output_length(ctx, LOREM4096_SIZE, &output_len) != YACA_ERROR_NONE) + if (yaca_context_get_output_length(ctx, enc_len, &output_len) != YACA_ERROR_NONE) goto exit; /* For the finalize */ diff --git a/examples/seal.c b/examples/seal.c index 7a1aaa0..c0feacf 100644 --- a/examples/seal.c +++ b/examples/seal.c @@ -100,7 +100,7 @@ void encrypt_seal(const yaca_encrypt_algorithm_e algo, goto exit; /* For the update */ - if (yaca_context_get_output_length(ctx, LOREM4096_SIZE, &output_len) != YACA_ERROR_NONE) + if (yaca_context_get_output_length(ctx, enc_len, &output_len) != YACA_ERROR_NONE) goto exit; /* For the finalize */ @@ -236,7 +236,7 @@ void encrypt_seal_aes_gcm(void) goto exit; /* For the update */ - if (yaca_context_get_output_length(ctx, LOREM4096_SIZE, &output_len) != YACA_ERROR_NONE) + if (yaca_context_get_output_length(ctx, enc_len, &output_len) != YACA_ERROR_NONE) goto exit; /* For the finalize */ @@ -391,7 +391,7 @@ void encrypt_seal_aes_ccm(void) goto exit; /* For the update */ - if (yaca_context_get_output_length(ctx, LOREM4096_SIZE, &output_len) != YACA_ERROR_NONE) + if (yaca_context_get_output_length(ctx, enc_len, &output_len) != YACA_ERROR_NONE) goto exit; /* For the finalize */ |