]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
(test_main): New test case, with a
authorNiels Möller <nisse@lysator.liu.se>
Mon, 10 Oct 2005 17:26:26 +0000 (19:26 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Mon, 10 Oct 2005 17:26:26 +0000 (19:26 +0200)
very large sha1 input.

Rev: src/nettle/testsuite/sha1-huge-test.c:1.1

testsuite/sha1-huge-test.c [new file with mode: 0644]

diff --git a/testsuite/sha1-huge-test.c b/testsuite/sha1-huge-test.c
new file mode 100644 (file)
index 0000000..4f1b4dc
--- /dev/null
@@ -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();
+}