All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bouncycastle.crypto.test.MD4DigestTest Maven / Gradle / Ivy

Go to download

The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms. This jar contains JCE provider and lightweight API for the Bouncy Castle Cryptography APIs for JDK 1.5 to JDK 1.8 with debug enabled.

There is a newer version: 1.70
Show newest version
package org.bouncycastle.crypto.test;

import org.bouncycastle.crypto.Digest;
import org.bouncycastle.crypto.digests.MD4Digest;

/**
 * standard vector test for MD4 from RFC 1320.
 */
public class MD4DigestTest
    extends DigestTest
{
    static private String[] messages =
    {
        "",
        "a",
        "abc",
        "12345678901234567890123456789012345678901234567890123456789012345678901234567890"
    };
    
    static private String[] digests =
    {
        "31d6cfe0d16ae931b73c59d7e0c089c0",
        "bde52cb31de33e46245e05fbdbd6fb24",
        "a448017aaf21d8525fc10ae87aa6729d",
        "e33b4ddc9c38f2199c3e7b164fcc0536"
    };

    MD4DigestTest()
    {
        super(new MD4Digest(), messages, digests);
    }

    protected Digest cloneDigest(Digest digest)
    {
        return new MD4Digest((MD4Digest)digest);
    }
    
    public static void main(
        String[]    args)
    {
        runTest(new MD4DigestTest());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy