Code example for ECParameterSpec

Methods: getCurve

        ECPoint generator = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L));
        BigInteger order = BigInteger.valueOf(5L);
        int cofactor = 10;
        ECParameterSpec ps = 
            new ECParameterSpec(curve, generator, order, cofactor);
        EllipticCurve curveRet = ps.getCurve();
        assertEquals(curve, curveRet);
        assertSame(curve, curveRet);
     * Test for <code>getGenerator()</code> method<br> 
     * Assertion: returns generator<br> 
     * Test preconditions: <code>ECParameterSpec</code> instance 
     * created using valid parameters<br> 
     * Expected: must return ref to the <code>ECPoint</code> object 
     * which is equal to the one passed to the constructor; (both must refer 
     * the same object)