From 37da2899f40661e3e9631e497da8dc59b971cbd0 Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Fri, 22 Dec 2006 17:07:39 +0000 Subject: 20060303a --- libsec/port/md4test.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 libsec/port/md4test.c (limited to 'libsec/port/md4test.c') diff --git a/libsec/port/md4test.c b/libsec/port/md4test.c new file mode 100644 index 00000000..417cb333 --- /dev/null +++ b/libsec/port/md4test.c @@ -0,0 +1,31 @@ +#include "os.h" +#include +#include + +char *tests[] = { + "", + "a", + "abc", + "message digest", + "abcdefghijklmnopqrstuvwxyz", + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", + "12345678901234567890123456789012345678901234567890123456789012345678901234567890", + 0 +}; + +void +main(void) +{ + char **pp; + uchar *p; + int i; + uchar digest[MD5dlen]; + + for(pp = tests; *pp; pp++){ + p = (uchar*)*pp; + md4(p, strlen(*pp), digest, 0); + for(i = 0; i < MD5dlen; i++) + print("%2.2ux", digest[i]); + print("\n"); + } +} -- cgit v1.2.3