diff options
author | lloyd <[email protected]> | 2008-10-22 18:47:13 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-10-22 18:47:13 +0000 |
commit | 44130a97960477d0cfe482773bcc01b99c76c54e (patch) | |
tree | 48c8bb1d22b7a4eb28f1f8d5acc8626ed070db76 /checks | |
parent | bdf4f43368b697edc95a53530d6f3f9919d3b9ce (diff) |
Use heap rather than stack for data input. Increase size to 128k
Diffstat (limited to 'checks')
-rw-r--r-- | checks/bench.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/checks/bench.cpp b/checks/bench.cpp index 81a6a96d1..93620224a 100644 --- a/checks/bench.cpp +++ b/checks/bench.cpp @@ -31,17 +31,17 @@ double bench_filter(std::string name, Botan::Filter* filter, { Botan::Pipe pipe(filter, new BitBucket); - pipe.start_msg(); + Botan::SecureVector<byte> buf(128 * 1024); + rng.randomize(buf, buf.size()); - byte buf[32 * 1024]; - Timer timer(name, sizeof(buf)); + pipe.start_msg(); - rng.randomize(buf, sizeof(buf)); + Timer timer(name, buf.size()); while(timer.seconds() < seconds) { timer.start(); - pipe.write(buf, sizeof(buf)); + pipe.write(buf, buf.size()); timer.stop(); } |