Examples of ECFieldFp


Examples of java.security.spec.ECFieldFp

     * Test preconditions: pass <code>null</code> as mentioned parameters<br>
     * Expected: must throw <code>NullPointerException</code>
     */
    public final void testEllipticCurveECFieldBigIntegerBigInteger02() {
        // test case 1 parameters set
        ECFieldFp f = null;
        BigInteger a = BigInteger.ONE;
        BigInteger b = BigInteger.valueOf(19L);

        // perform test case 1
        try {
            new EllipticCurve(f, a, b);
            fail("#1: Expected NPE not thrown");
        } catch (NullPointerException ok) {}

        // test case 2 parameters set,
        f = new ECFieldFp(BigInteger.valueOf(23L));
        a = null;
        b = BigInteger.valueOf(19L);
        // perform test case 2
        try {
            new EllipticCurve(f, a, b);
            fail("#2: Expected NPE not thrown");
        } catch (NullPointerException ok) {}

        // test case 3 parameters set,
        f = new ECFieldFp(BigInteger.valueOf(23L));
        a = BigInteger.ONE;
        b = null;
        // perform test case 3
        try {
            new EllipticCurve(f, a, b);
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.