FileDocCategorySizeDatePackage
ECPublicKeySpec.javaAPI DocAndroid 1.5 API2820Wed May 06 22:41:06 BST 2009java.security.spec

ECPublicKeySpec

public class ECPublicKeySpec extends Object implements KeySpec
The parameters specifying an Elliptic Curve (EC) public key.
since
Android 1.0

Fields Summary
private final ECPoint
w
private final ECParameterSpec
params
Constructors Summary
public ECPublicKeySpec(ECPoint w, ECParameterSpec params)
Creates a new {@code ECPublicKey} with the specified public elliptic curve point and parameter specification.

param
w the public elliptic curve point {@code W}.
param
params the domain parameter specification.
throws
IllegalArgumentException if the specified point {@code W} is at infinity.
since
Android 1.0

        this.w = w;
        this.params = params;
        // throw NullPointerException if w or params is null
        if (this.w == null) {
            throw new NullPointerException(Messages.getString("security.83", "w")); //$NON-NLS-1$ //$NON-NLS-2$
        }
        if (this.params == null) {
            throw new NullPointerException(Messages.getString("security.83", "params")); //$NON-NLS-1$ //$NON-NLS-2$
        }
        // throw IllegalArgumentException if w is point at infinity
        if (this.w.equals(ECPoint.POINT_INFINITY)) {
            throw new IllegalArgumentException(
                Messages.getString("security.84")); //$NON-NLS-1$
        }
    
Methods Summary
public java.security.spec.ECParameterSpecgetParams()
Returns the domain parameter specification.

return
the domain parameter specification.
since
Android 1.0

        return params;
    
public java.security.spec.ECPointgetW()
Returns the public elliptic curve point {@code W}.

return
the public elliptic curve point {@code W}.
since
Android 1.0

        return w;