Code example for ECPublicKeySpec

Methods: getParams

        ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L));
        ECParameterSpec params =
            new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10);
        ECPublicKeySpec ks = new ECPublicKeySpec(g, params);
        ECParameterSpec paramsRet = ks.getParams();
        assertEquals(params, paramsRet);
        assertSame(params, paramsRet);
     * Test for <code>getW()</code> method<br> 
     * Assertion: returns associated public point<br> 
     * Test preconditions: <code>ECPublicKeySpec</code> instance 
     * created using valid parameters<br> 
     * Expected: must return w value which is equal 
     * to the one passed to the constructor; (both must refer 
     * the same object)