Package org.bouncycastle.util.test

Examples of org.bouncycastle.util.test.TestResult


    public static void main(
        String[]    args)
    {
        RIPEMD128HMacTest   test = new RIPEMD128HMacTest();
        TestResult          result = test.perform();

        System.out.println(result);
    }
View Full Code Here


    public TestResult perform()
    {
        for (int i = 0; i != tests.length; i++)
        {
            TestResult  res = tests[i].perform();

            if (!res.isSuccessful())
            {
                return res;
            }
        }
View Full Code Here

    public TestResult perform()
    {
        BufferedBlockCipher cipher = new PaddedBufferedBlockCipher(new CBCBlockCipher(new DESEngine()));
        Test                test = new PBETest(0, cipher, sample1, 64);
        TestResult          result = test.perform();

        if (!result.isSuccessful())
        {
            return new SimpleTestResult(false, getName() + ": " + result.toString());
        }

        cipher = new PaddedBufferedBlockCipher(new CBCBlockCipher(new DESedeEngine()));
        test = new PBETest(1, cipher, sample2, 192);
        result = test.perform();

        if (!result.isSuccessful())
        {
            return new SimpleTestResult(false, getName() + ": " + result.toString());
        }

        cipher = new PaddedBufferedBlockCipher(new CBCBlockCipher(new RC2Engine()));
        test = new PBETest(2, cipher, sample3, 0);
        result = test.perform();

        if (!result.isSuccessful())
        {
            return new SimpleTestResult(false, getName() + ": " + result.toString());
        }

        return new SimpleTestResult(true, getName() + ": Okay");
    }
View Full Code Here

    public static void main(
        String[]    args)
    {
        Test    test = new PKCS5Test();

        TestResult  result = test.perform();

        System.out.println(result.toString());
    }
View Full Code Here

    public static void main(
        String[]    args)
    {
        SHA512DigestTest  test = new SHA512DigestTest();
        TestResult      result = test.perform();

        System.out.println(result);
    }
View Full Code Here

    public static void main(
        String[]    args)
    {
        TigerDigestTest test = new TigerDigestTest();
        TestResult          result = test.perform();

        System.out.println(result);
    }
View Full Code Here

    public static void main(
        String[]    args)
    {
        MacTest    test = new MacTest();
        TestResult result = test.perform();

        System.out.println(result);
    }
View Full Code Here

    public static void main(
        String[]    args)
    {
        ModeTest    test = new ModeTest();
        TestResult result = test.perform();

        System.out.println(result);
    }
View Full Code Here

    public static void main(
        String[]    args)
    {
        BlowfishTest    test = new BlowfishTest();
        TestResult      result = test.perform();

        System.out.println(result);
    }
View Full Code Here

    public static void main(
        String[]    args)
    {
        SerpentTest    test = new SerpentTest();
        TestResult      result = test.perform();

        System.out.println(result);
    }
View Full Code Here

TOP

Related Classes of org.bouncycastle.util.test.TestResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.