Code example for ECPublicKeySpec

0
    ECPublicKeySpec ecpks;
 
    protected void setUp() throws Exception { 
        super.setUp(); 
        ECPoint ecpoint = new ECPoint(BigInteger.valueOf(1), BigInteger
                .valueOf(1));
        EllipticCurve curve = new EllipticCurve(new ECFieldF2m(2), BigInteger
                .valueOf(1), BigInteger.valueOf(1));
 
        w = new ECPoint(BigInteger.valueOf(1), BigInteger.valueOf(1));
        params = new ECParameterSpec(curve, ecpoint, BigInteger.valueOf(1), 1);
        ecpks = new ECPublicKeySpec(w, params);
    } 
 
    protected void tearDown() throws Exception { 
        w = null;
        params = null;
        ecpks = null;
        super.tearDown(); 
    }