aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Hamburg <mike@shiftleft.org>2017-05-23 16:12:01 -0700
committerMichael Hamburg <mike@shiftleft.org>2017-05-23 16:12:01 -0700
commitc6a1cd8db67c0df75422751e66a2a176547104d4 (patch)
tree7a997e0ee0aae4efa5dd7a1306cb504fc9d7ae31
parentbetter test (diff)
downloadgoldilocks-c6a1cd8db67c0df75422751e66a2a176547104d4.tar.xz
goldilocks-c6a1cd8db67c0df75422751e66a2a176547104d4.zip
better testv0.9.1
-rw-r--r--test/test_decaf.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/test_decaf.cxx b/test/test_decaf.cxx
index dd3a16e..c63cd98 100644
--- a/test/test_decaf.cxx
+++ b/test/test_decaf.cxx
@@ -599,6 +599,7 @@ static void run() {
}; /* template<GroupId GROUP> struct Tests */
+template<typename T>
static void test_xof() {
/* TODO: more testing of XOFs */
Test test("XOF");
@@ -607,7 +608,7 @@ static void test_xof() {
FixedArrayBuffer<1024> a,b,c;
rng.read(c);
- SHAKE<128> s1, s2;
+ T s1, s2;
unsigned i;
for (i=0; i<c.size(); i++) s1.update(c.slice(i,1));
s2.update(c);
@@ -672,7 +673,8 @@ static void test_rng() {
int main(int argc, char **argv) {
(void) argc; (void) argv;
test_rng();
- test_xof();
+ test_xof<SHAKE<128> >();
+ test_xof<SHAKE<256> >();
printf("\n");
run_for_all_curves<Tests>();
if (passing) printf("Passed all tests.\n");