Code example for ECPrivateKeySpec

Methods: getParams

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