~brian-thomason/+junk/bouncycastle

« back to all changes in this revision

Viewing changes to test/src/org/bouncycastle/crypto/test/MD4DigestTest.java

  • Committer: Brian Thomason
  • Date: 2011-12-20 17:20:32 UTC
  • Revision ID: brian.thomason@canonical.com-20111220172032-rdtm13jgdxtksacr
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.bouncycastle.crypto.test;
 
2
 
 
3
import org.bouncycastle.crypto.Digest;
 
4
import org.bouncycastle.crypto.digests.MD4Digest;
 
5
 
 
6
/**
 
7
 * standard vector test for MD4 from RFC 1320.
 
8
 */
 
9
public class MD4DigestTest
 
10
    extends DigestTest
 
11
{
 
12
    static private String[] messages =
 
13
    {
 
14
        "",
 
15
        "a",
 
16
        "abc",
 
17
        "12345678901234567890123456789012345678901234567890123456789012345678901234567890"
 
18
    };
 
19
    
 
20
    static private String[] digests =
 
21
    {
 
22
        "31d6cfe0d16ae931b73c59d7e0c089c0",
 
23
        "bde52cb31de33e46245e05fbdbd6fb24",
 
24
        "a448017aaf21d8525fc10ae87aa6729d",
 
25
        "e33b4ddc9c38f2199c3e7b164fcc0536"
 
26
    };
 
27
 
 
28
    MD4DigestTest()
 
29
    {
 
30
        super(new MD4Digest(), messages, digests);
 
31
    }
 
32
 
 
33
    protected Digest cloneDigest(Digest digest)
 
34
    {
 
35
        return new MD4Digest((MD4Digest)digest);
 
36
    }
 
37
    
 
38
    public static void main(
 
39
        String[]    args)
 
40
    {
 
41
        runTest(new MD4DigestTest());
 
42
    }
 
43
}