aboutsummaryrefslogtreecommitdiffstats
path: root/checks/bench.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-06-07 16:56:21 +0000
committerlloyd <[email protected]>2008-06-07 16:56:21 +0000
commit0875f4f0d1f16814b784a4ac08f4d631890b3d6e (patch)
tree16d04004d253f4d6408e9221dd4bc39d47841067 /checks/bench.cpp
parentb0c6cb743534d68ec1af45dc5104da4bf152173d (diff)
Add a full set of tests for the ANSI X9.31 PRNG, using data taken
from the NIST CAVS dataset, taken on June 7 2008 from http://csrc.nist.gov/groups/STM/cavp/standards.html AES-128, AES-192, AES-256, and 2 and 3-key TripleDES variants are all tested.
Diffstat (limited to 'checks/bench.cpp')
-rw-r--r--checks/bench.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/checks/bench.cpp b/checks/bench.cpp
index 48db9d8cf..b9a50f4ab 100644
--- a/checks/bench.cpp
+++ b/checks/bench.cpp
@@ -7,7 +7,7 @@
#include <botan/libstate.h>
#include <botan/filters.h>
-using namespace Botan_types;
+using Botan::byte;
using Botan::u64bit;
#include "common.h"
@@ -75,7 +75,11 @@ double bench(const std::string& name, const std::string& filtername, bool html,
{
std::vector<std::string> params;
- params.push_back(std::string(int(2*keylen), 'A'));
+ Botan::SecureVector<byte> key(keylen);
+ Botan::global_state().randomize(key, key.size());
+ params.push_back(hex_encode(key, key.size()));
+
+ //params.push_back(std::string(int(2*keylen), 'A'));
params.push_back(std::string(int(2* ivlen), 'A'));
Botan::Filter* filter = lookup(filtername, params);