01: package org.bouncycastle.crypto.test;
02:
03: import org.bouncycastle.crypto.Digest;
04: import org.bouncycastle.crypto.digests.MD4Digest;
05:
06: /**
07: * standard vector test for MD4 from RFC 1320.
08: */
09: public class MD4DigestTest extends DigestTest {
10: static private String[] messages = {
11: "",
12: "a",
13: "abc",
14: "12345678901234567890123456789012345678901234567890123456789012345678901234567890" };
15:
16: static private String[] digests = {
17: "31d6cfe0d16ae931b73c59d7e0c089c0",
18: "bde52cb31de33e46245e05fbdbd6fb24",
19: "a448017aaf21d8525fc10ae87aa6729d",
20: "e33b4ddc9c38f2199c3e7b164fcc0536" };
21:
22: MD4DigestTest() {
23: super (new MD4Digest(), messages, digests);
24: }
25:
26: protected Digest cloneDigest(Digest digest) {
27: return new MD4Digest((MD4Digest) digest);
28: }
29:
30: public static void main(String[] args) {
31: runTest(new MD4DigestTest());
32: }
33: }
|