diff options
author | Michael Hamburg <mike@shiftleft.org> | 2017-05-23 16:10:44 -0700 |
---|---|---|
committer | Michael Hamburg <mike@shiftleft.org> | 2017-05-23 16:10:44 -0700 |
commit | a4c02cc75901b5d5d482d1384003f445e3be83dc (patch) | |
tree | 2364230ac08b9b39847341383cd2d80cf2e3421a | |
parent | test to make sure bug is gone (diff) | |
download | goldilocks-a4c02cc75901b5d5d482d1384003f445e3be83dc.tar.xz goldilocks-a4c02cc75901b5d5d482d1384003f445e3be83dc.zip |
better test
-rw-r--r-- | test/test_decaf.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/test_decaf.cxx b/test/test_decaf.cxx index 99a827a..dd3a16e 100644 --- a/test/test_decaf.cxx +++ b/test/test_decaf.cxx @@ -600,12 +600,18 @@ static void run() { }; /* template<GroupId GROUP> struct Tests */ static void test_xof() { + /* TODO: more testing of XOFs */ Test test("XOF"); + SpongeRng rng(Block("test_xof"),SpongeRng::DETERMINISTIC); - FixedArrayBuffer<1024> a,b; + FixedArrayBuffer<1024> a,b,c; + rng.read(c); SHAKE<128> s1, s2; unsigned i; + for (i=0; i<c.size(); i++) s1.update(c.slice(i,1)); + s2.update(c); + for (i=0; i<a.size(); i++) s1.output(a.slice(i,1)); s2.output(b); |