diff options
| author | Charles.Forsyth <devnull@localhost> | 2006-12-22 17:07:39 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2006-12-22 17:07:39 +0000 |
| commit | 37da2899f40661e3e9631e497da8dc59b971cbd0 (patch) | |
| tree | cbc6d4680e347d906f5fa7fca73214418741df72 /libsec/port/md4test.c | |
| parent | 54bc8ff236ac10b3eaa928fd6bcfc0cdb2ba46ae (diff) | |
20060303a
Diffstat (limited to 'libsec/port/md4test.c')
| -rw-r--r-- | libsec/port/md4test.c | 31 |
1 files changed, 31 insertions, 0 deletions
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 <mp.h> +#include <libsec.h> + +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"); + } +} |
