summaryrefslogtreecommitdiff
path: root/validat3.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2021-03-19 15:21:33 -0400
committerJeffrey Walton <noloader@gmail.com>2021-03-19 15:21:33 -0400
commit67972b53babeeee51d47989f149615d5911882bb (patch)
tree71f79be2d317dbec04b5f17463e713e9a7b28145 /validat3.cpp
parentbc1a4d5b5c977899e86209814663c983eaed7f8f (diff)
downloadcryptopp-git-67972b53babeeee51d47989f149615d5911882bb.tar.gz
Update DARN rng tests
Diffstat (limited to 'validat3.cpp')
-rw-r--r--validat3.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/validat3.cpp b/validat3.cpp
index ce9c6bdb..aed69e75 100644
--- a/validat3.cpp
+++ b/validat3.cpp
@@ -935,6 +935,10 @@ bool TestDARN()
DARN& darn = dynamic_cast<DARN&>(*rng.get());
pass = Test_RandomNumberGenerator(darn) && pass;
+ // DARN does not accept entropy. However, the contract is no throw
+ const byte entropy[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ (void)darn.IncorporateEntropy(entropy, sizeof(entropy));
+
MaurerRandomnessTest maurer;
const unsigned int SIZE = 1024*10;
RandomNumberSource(darn, SIZE, true, new Redirector(maurer));