fix rsa benchmark decrypt buffer

This commit is contained in:
toddouska
2013-01-14 15:14:46 -08:00
parent fa9126c2be
commit 5889b5d96d

View File

@ -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 */