aboutsummaryrefslogtreecommitdiffstats
path: root/checks/pk_bench.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-05-18 20:32:36 +0000
committerlloyd <[email protected]>2012-05-18 20:32:36 +0000
commitc691561f3198f481c13457433efbccc1c9fcd898 (patch)
treea45ea2c5a30e0cb009fbcb68a61ef39332ff790c /checks/pk_bench.cpp
parentd76700f01c7ecac5633edf75f8d7408b46c5dbac (diff)
Fairly huge update that replaces the old secmem types with std::vector
using a custom allocator. Currently our allocator just does new/delete with a memset before deletion, and the mmap and mlock allocators have been removed.
Diffstat (limited to 'checks/pk_bench.cpp')
-rw-r--r--checks/pk_bench.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/checks/pk_bench.cpp b/checks/pk_bench.cpp
index ab4702dba..8241ee5d1 100644
--- a/checks/pk_bench.cpp
+++ b/checks/pk_bench.cpp
@@ -104,7 +104,7 @@ void benchmark_enc_dec(PK_Encryptor& enc, PK_Decryptor& dec,
RandomNumberGenerator& rng,
u32bit runs, double seconds)
{
- SecureVector<byte> plaintext, ciphertext;
+ std::vector<byte> plaintext, ciphertext;
for(u32bit i = 0; i != runs; ++i)
{
@@ -127,7 +127,7 @@ void benchmark_enc_dec(PK_Encryptor& enc, PK_Decryptor& dec,
if(dec_timer.seconds() < seconds)
{
dec_timer.start();
- SecureVector<byte> plaintext_out = dec.decrypt(ciphertext);
+ std::vector<byte> plaintext_out = unlock(dec.decrypt(ciphertext));
dec_timer.stop();
if(plaintext_out != plaintext)
@@ -143,7 +143,7 @@ void benchmark_sig_ver(PK_Verifier& ver, PK_Signer& sig,
RandomNumberGenerator& rng,
u32bit runs, double seconds)
{
- SecureVector<byte> message, signature, sig_random;
+ std::vector<byte> message, signature, sig_random;
for(u32bit i = 0; i != runs; ++i)
{
@@ -171,7 +171,7 @@ void benchmark_sig_ver(PK_Verifier& ver, PK_Signer& sig,
if((i % 100) == 0)
{
- sig_random = rng.random_vec(signature.size());
+ sig_random = unlock(rng.random_vec(signature.size()));
verify_timer.start();
const bool verified_bad = ver.verify_message(message, sig_random);