From 5889b5d96db2760e229853ca01f3cbb8989820ca Mon Sep 17 00:00:00 2001 From: toddouska Date: Mon, 14 Jan 2013 15:14:46 -0800 Subject: [PATCH] fix rsa benchmark decrypt buffer --- ctaocrypt/benchmark/benchmark.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ctaocrypt/benchmark/benchmark.c b/ctaocrypt/benchmark/benchmark.c index cc02fdf44..5860be514 100644 --- a/ctaocrypt/benchmark/benchmark.c +++ b/ctaocrypt/benchmark/benchmark.c @@ -462,7 +462,6 @@ void bench_rsa(void) word32 idx = 0; byte message[] = "Everyone gets Friday off."; - byte* output; byte enc[512]; /* for up to 4096 bit */ const int len = (int)strlen((char*)message); double start, total, each, milliEach; @@ -495,8 +494,10 @@ void bench_rsa(void) start = current_time(); - for (i = 0; i < times; i++) - RsaPrivateDecryptInline(enc, (word32)bytes, &output, &rsaKey); + for (i = 0; i < times; i++) { + byte out[512]; /* for up to 4096 bit */ + RsaPrivateDecrypt(enc, (word32)bytes, out, sizeof(out), &rsaKey); + } total = current_time() - start; each = total / times; /* per second */