symm/sha3.c: Attach the correct operations to the `shake256' cipher.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 4 Jul 2017 16:54:50 +0000 (17:54 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 4 Jul 2017 23:50:30 +0000 (00:50 +0100)
Rather embarrassing.  Thanks to GCC 6 for pointing out that
`shake256_gcops' was unused.

symm/sha3.c

index 97b41e3..97a3f7a 100644 (file)
@@ -563,7 +563,7 @@ static gcipher *shake128_gcinit(const void *k, size_t sz)
 static gcipher *shake256_gcinit(const void *k, size_t sz)
 {
   shake_gcctx *cc = S_CREATE(shake_gcctx);
-  cc->gc.ops = &shake128_gcops;
+  cc->gc.ops = &shake256_gcops;
   shake256_init(&cc->c); shake_hash(&cc->c, k, sz); shake_xof(&cc->c);
   return (&cc->gc);
 }