summaryrefslogtreecommitdiff
path: root/libc/crypt
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2009-03-15 15:53:55 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2009-03-15 15:53:55 +0000
commit780a701d63b25431f31d77f0701f98bfe5ea2d94 (patch)
treebe2c2f5c557acee55c8ab41b6d3a87d8f84b3cbd /libc/crypt
parenta6728b114d9c99b8515accb002474ea703a6705c (diff)
downloadeglibc2-780a701d63b25431f31d77f0701f98bfe5ea2d94.tar.gz
Merge changes between r7922 and r8107 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@8108 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/crypt')
-rw-r--r--libc/crypt/sha256test.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libc/crypt/sha256test.c b/libc/crypt/sha256test.c
index b13a3c511..39e80307c 100644
--- a/libc/crypt/sha256test.c
+++ b/libc/crypt/sha256test.c
@@ -84,7 +84,17 @@ main (void)
"\xf1\x80\x9a\x48\xa4\x97\x20\x0e\x04\x6d\x39\xcc\xc7\x11\x2c\xd0";
if (memcmp (expected, sum, 32) != 0)
{
- printf ("test %d failed\n", cnt);
+ printf ("test %d failed\n", cnt++);
+ result = 1;
+ }
+
+ __sha256_init_ctx (&ctx);
+ for (int i = 0; i < 100000; ++i)
+ __sha256_process_bytes (buf, 10, &ctx);
+ __sha256_finish_ctx (&ctx, sum);
+ if (memcmp (expected, sum, 32) != 0)
+ {
+ printf ("test %d failed\n", cnt++);
result = 1;
}