aboutsummaryrefslogtreecommitdiffstats
path: root/src/rng/randpool/randpool.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-11-19 17:35:33 +0000
committerlloyd <[email protected]>2009-11-19 17:35:33 +0000
commit46eb21cd08a0268d860eeef449e7474fb615b050 (patch)
tree029d5bdea51f1606ecb6f241c5964881b98b1d5f /src/rng/randpool/randpool.cpp
parentac3db1c524fdecbc069a5e1323d93e4a3b933152 (diff)
parent2af8cfbaf23033250a6819be9f45f82bf03e898d (diff)
propagate from branch 'net.randombit.botan' (head 2f3665f775fafbdfa517ecdca7f872e35bd90277)
to branch 'net.randombit.botan.c++0x' (head 45169719ddd8977b1eb20637576bc855dbc867a0)
Diffstat (limited to 'src/rng/randpool/randpool.cpp')
-rw-r--r--src/rng/randpool/randpool.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/rng/randpool/randpool.cpp b/src/rng/randpool/randpool.cpp
index fb51db300..f4ce84079 100644
--- a/src/rng/randpool/randpool.cpp
+++ b/src/rng/randpool/randpool.cpp
@@ -8,9 +8,8 @@
#include <botan/randpool.h>
#include <botan/loadstor.h>
#include <botan/xor_buf.h>
-#include <botan/timer.h>
-#include <botan/stl_util.h>
#include <algorithm>
+#include <chrono>
namespace Botan {
@@ -51,7 +50,9 @@ void Randpool::randomize(byte out[], u32bit length)
*/
void Randpool::update_buffer()
{
- const u64bit timestamp = system_time();
+ const u64bit timestamp =
+ std::chrono::duration_cast<std::chrono::nanoseconds>(
+ std::chrono::high_resolution_clock::now().time_since_epoch()).count();
for(u32bit i = 0; i != counter.size(); ++i)
if(++counter[i])
@@ -206,8 +207,8 @@ Randpool::~Randpool()
delete cipher;
delete mac;
- std::for_each(entropy_sources.begin(), entropy_sources.end(),
- del_fun<EntropySource>());
+ for(auto i = entropy_sources.begin(); i != entropy_sources.end(); ++i)
+ delete *i;
}
}