Re: Validating MD5 message digest
From: Doug McIntyre (merlyn@visi.com)
Date: 03/28/03
- Previous message: phn@icke-reklam.ipsec.nu: "Re: Validating MD5 message digest"
- In reply to: zds: "Validating MD5 message digest"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: Doug McIntyre <merlyn@visi.com> Date: 28 Mar 2003 21:22:37 GMT
"zds" <zsy@ix.netcom.com> writes:
>I was wondering if anyone could suggest a way for me to validate an MD5
>implementation. I basically have an implementation that generates MD5
>fingerprints for a set of files. However, I want to write a unit test that
>proves that the message digest being generated by my implementation is in
>fact correct.
Well, you could make sure that your function matches the output
specified in RFC 1321...
A.5 Test suite
The MD5 test suite (driver option "-x") should print the following
results:
MD5 test suite:
MD5 ("") = d41d8cd98f00b204e9800998ecf8427e
MD5 ("a") = 0cc175b9c0f1b6a831c399e269772661
MD5 ("abc") = 900150983cd24fb0d6963f7d28e17f72
MD5 ("message digest") = f96b697d7cb7938d525a2f31aaf161d0
MD5 ("abcdefghijklmnopqrstuvwxyz") = c3fcd3d76192e4007dfb496cca67e13b
MD5 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") =
d174ab98d277d9f5a5611c2c9f419d9f
MD5 ("123456789012345678901234567890123456789012345678901234567890123456
78901234567890") = 57edf4a22be3c955ac49da2e2107b67a
And/or compile up the code given in RFC1321 and make sure your output
matches any given input.
-- Doug McIntyre merlyn@visi.com Network Engineer/Jack of All Trades Vector Internet Services, Inc.
- Previous message: phn@icke-reklam.ipsec.nu: "Re: Validating MD5 message digest"
- In reply to: zds: "Validating MD5 message digest"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|