Package org.bouncycastle.util.test

Examples of org.bouncycastle.util.test.Test.perform()


    }

    public static void main(String[] args)
    {
        Test test = new AttrCertSelectorTest();
        TestResult result = test.perform();
        System.out.println(result);
    }
}
View Full Code Here


        String[]    args)
    {
        Security.addProvider(new BouncyCastleProvider());

        Test            test = new WrapTest();
        TestResult      result = test.perform();

        System.out.println(result.toString());
        if (result.getException() != null)
        {
            result.getException().printStackTrace();
View Full Code Here

        String[]    args)
    {
        Security.addProvider(new BouncyCastleProvider());

        Test            test = new PSSTest();
        TestResult      result = test.perform();

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

    }

    public static void main(String[] args)
    {
        Test test = new AttrCertSelectorTest();
        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;
        }
View Full Code Here

        {
            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;
        }
View Full Code Here

        {
            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;
        }
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());
        }
View Full Code Here

            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());
        }
View Full Code Here

            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());
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.