aboutsummaryrefslogtreecommitdiff
path: root/crypt/md5test.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypt/md5test.c')
-rw-r--r--crypt/md5test.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/crypt/md5test.c b/crypt/md5test.c
index cfd9605..5397e5a 100644
--- a/crypt/md5test.c
+++ b/crypt/md5test.c
@@ -35,10 +35,19 @@ main (int argc, char *argv[])
for (cnt = 0; cnt < (int) (sizeof (tests) / sizeof (tests[0])); ++cnt)
{
+ int i;
+ int j;
+
__md5_init_ctx (&ctx);
__md5_process_bytes (tests[cnt].input, strlen (tests[cnt].input), &ctx);
__md5_finish_ctx (&ctx, sum);
result |= memcmp (tests[cnt].result, sum, 16);
+
+ __md5_init_ctx (&ctx);
+ for (i = 0; tests[cnt].input[i] != '\0'; ++i)
+ __md5_process_bytes (&tests[cnt].input[i], 1, &ctx);
+ __md5_finish_ctx (&ctx, sum);
+ result |= memcmp (tests[cnt].result, sum, 16);
}
return result;