]> git.codecow.com Git - Monocypher.git/commitdiff
Expand Blake2b tests to full length keys and hashes
authorLoup Vaillant <loup@loup-vaillant.fr>
Fri, 23 Apr 2021 12:08:46 +0000 (14:08 +0200)
committerLoup Vaillant <loup@loup-vaillant.fr>
Fri, 23 Apr 2021 12:08:46 +0000 (14:08 +0200)
tests/gen/blake2b.c

index a192133f5bd76c2dd53e14b7256a9de4e083be3f..ec961b6fe8725bf09971819bf87aad7b9aa28981 100644 (file)
@@ -72,9 +72,9 @@ int main(void)
     // Official test vectors test for all message sizes, so no need to
     // repeat ourselves here. However they only test keys and hashes of size 64.
     // Here we're testing many possible key and hash sizes.
-    for (size_t key_size = 0; key_size < 64; key_size += 16) {
-        for (size_t hash_size = 0; hash_size < 64; hash_size += 16) {
-            for (size_t input_size = 0; input_size < 256; input_size += 16) {
+    for (size_t key_size = 0; key_size <= 64; key_size += 16) {
+        for (size_t hash_size = 0; hash_size <= 64; hash_size += 16) {
+            for (size_t input_size = 0; input_size <= 256; input_size += 16) {
                 test(input_size, key_size, hash_size);
             }
         }