From: Loup Vaillant Date: Fri, 23 Apr 2021 12:08:46 +0000 (+0200) Subject: Expand Blake2b tests to full length keys and hashes X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=719859dbaccf82191bb7f66bb61dd8428faa15fc;p=Monocypher.git Expand Blake2b tests to full length keys and hashes --- diff --git a/tests/gen/blake2b.c b/tests/gen/blake2b.c index a192133..ec961b6 100644 --- a/tests/gen/blake2b.c +++ b/tests/gen/blake2b.c @@ -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); } }