Package org.bouncycastle.util.test

Examples of org.bouncycastle.util.test.TestResult


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

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


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

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

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

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

        return new SimpleTestResult(true, getName() + ": Okay");
    }

    public TestResult perform()
    {
        TestResult      result = super.perform();
        if (!result.isSuccessful())
        {
            return result;
        }

        byte[]  kek1 = Hex.decode("255e0d1c07b646dfb3134cc843ba8aa71f025b7c0838251f");
        byte[]  iv1 = Hex.decode("5dd4cbfc96f5453b");
        byte[]  in1 = Hex.decode("2923bf85e06dd6ae529149f1f1bae9eab3a7da3d860d3e98");
        byte[]  out1 = Hex.decode("690107618ef092b3b48ca1796b234ae9fa33ebb4159604037db5d6a84eb3aac2768c632775a467d4");
        result = wrapTest(1, kek1, iv1, in1, out1);
        if (!result.isSuccessful())
        {
            return result;
        }

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

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

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

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

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

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

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

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

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

        byte[]  key1 = { (byte)0x01, (byte)0x23, (byte)0x45, (byte)0x67, (byte)0x89, (byte)0xAB, (byte)0xCD, (byte)0xEF };
        byte[]  key2 = { (byte)0x01, (byte)0x23, (byte)0x45, (byte)0x67, (byte)0x89, (byte)0xAB, (byte)0xCD, (byte)0xEF, (byte)0xee, (byte)0xff  };
        byte[]  iv = { 1, 2, 3, 4, 5, 6, 7, 8 };

        Test        test = new CTSTester(1, new DESEngine(), new KeyParameter(key1), in1, out1);
        TestResult  result = test.perform();

        if (!result.isSuccessful())
        {
            return result;
        }

        test = new CTSTester(2, new CBCBlockCipher(new DESEngine()), new ParametersWithIV(new KeyParameter(key1), iv), in1, out2);
        result = test.perform();

        if (!result.isSuccessful())
        {
            return result;
        }

        test = new CTSTester(3, new CBCBlockCipher(new SkipjackEngine()), new ParametersWithIV(new KeyParameter(key2), iv), in2, out3);
        result = test.perform();

        if (!result.isSuccessful())
        {
            return result;
        }

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

    public static void main(
        String[]    args)
    {
        CTSTest         test = new CTSTest();
        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.