Code example for ECParameterSpec

Methods: getGenerator

0
                              BigInteger.valueOf(4L));
        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);
        ECPoint generatorRet = ps.getGenerator();
        assertEquals(generator, generatorRet);
        assertSame(generator, generatorRet);
    } 
 
    /** 
     * Test for <code>getOrder()</code> method<br> 
     * Assertion: returns order<br> 
     * Test preconditions: <code>ECParameterSpec</code> instance 
     * created using valid parameters<br> 
     * Expected: must return ref to the <code>BigInteger</code> object 
     * which is equal to the one passed to the constructor; (both must refer 
     * the same object) 
     */ 
    public final void testGetOrder() {