Switch FastRandomContext to ChaCha20

This commit is contained in:
Pieter Wuille
2017-02-15 17:45:22 -08:00
parent e04326fe66
commit 16329224e7
10 changed files with 126 additions and 43 deletions

View File

@@ -28,6 +28,7 @@ class prevector_tester {
typedef typename pretype::size_type Size;
bool passed = true;
FastRandomContext rand_cache;
uint256 rand_seed;
template <typename A, typename B>
@@ -183,13 +184,12 @@ public:
}
~prevector_tester() {
BOOST_CHECK_MESSAGE(passed, "insecure_rand_Rz: "
<< rand_cache.Rz
<< ", insecure_rand_Rw: "
<< rand_cache.Rw);
BOOST_CHECK_MESSAGE(passed, "insecure_rand: " + rand_seed.ToString());
}
prevector_tester() {
seed_insecure_rand();
rand_seed = insecure_rand_seed;
rand_cache = insecure_rand_ctx;
}
};