From: Niels Möller Date: Mon, 10 Oct 2005 17:26:26 +0000 (+0200) Subject: (test_main): New test case, with a X-Git-Tag: nettle_1.14_release_20051205~186 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7840b46efc3d802cd5d06a1941b6d5acc8ef5bce;p=thirdparty%2Fnettle.git (test_main): New test case, with a very large sha1 input. Rev: src/nettle/testsuite/sha1-huge-test.c:1.1 --- diff --git a/testsuite/sha1-huge-test.c b/testsuite/sha1-huge-test.c new file mode 100644 index 00000000..4f1b4dce --- /dev/null +++ b/testsuite/sha1-huge-test.c @@ -0,0 +1,15 @@ +#include "testutils.h" +#include "sha.h" + +int +test_main(void) +{ + /* Hashes 10 000 000 x 30 000 bytes > 64 * 2^32. This overflows the + low word of the block counter. This test vector is not cross + checked with any other sha1 implementation. */ + test_hash_large(&nettle_sha1, 10000000, 30000, 'a', + H("0ba79364dc64648f 2074fb4bc5c28bcf" + "b7a787b0")); + + SUCCESS(); +}