java.security.spec
Class ECPoint

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.security.spec.ECPoint

public class ECPoint
extends Object sample code for java.lang.Object definition code for java.lang.Object

This immutable class represents a point on an elliptic curve (EC) in affine coordinates. Other coordinate systems can extend this class to represent this point in other coordinates.

Since:
1.5

Field Summary
static ECPoint sample code for java.security.spec.ECPoint definition code for java.security.spec.ECPoint POINT_INFINITY sample code for java.security.spec.ECPoint.POINT_INFINITY definition code for java.security.spec.ECPoint.POINT_INFINITY
          This defines the point at infinity.
 
Constructor Summary
ECPoint sample code for java.security.spec.ECPoint.ECPoint(java.math.BigInteger, java.math.BigInteger) definition code for java.security.spec.ECPoint.ECPoint(java.math.BigInteger, java.math.BigInteger) (BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  x, BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  y)
          Creates an ECPoint from the specified affine x-coordinate x and affine y-coordinate y.
 
Method Summary
 boolean equals sample code for java.security.spec.ECPoint.equals(java.lang.Object) definition code for java.security.spec.ECPoint.equals(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  obj)
          Compares this elliptic curve point for equality with the specified object.
 BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger getAffineX sample code for java.security.spec.ECPoint.getAffineX() definition code for java.security.spec.ECPoint.getAffineX() ()
          Returns the affine x-coordinate x.
 BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger getAffineY sample code for java.security.spec.ECPoint.getAffineY() definition code for java.security.spec.ECPoint.getAffineY() ()
          Returns the affine y-coordinate y.
 int hashCode sample code for java.security.spec.ECPoint.hashCode() definition code for java.security.spec.ECPoint.hashCode() ()
          Returns a hash code value for this elliptic curve point.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

POINT_INFINITY sample code for java.security.spec.ECPoint.POINT_INFINITY

public static final ECPoint sample code for java.security.spec.ECPoint definition code for java.security.spec.ECPoint  POINT_INFINITY
This defines the point at infinity.

Constructor Detail

ECPoint sample code for java.security.spec.ECPoint(java.math.BigInteger, java.math.BigInteger) definition code for java.security.spec.ECPoint(java.math.BigInteger, java.math.BigInteger)

public ECPoint(BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  x,
               BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  y)
Creates an ECPoint from the specified affine x-coordinate x and affine y-coordinate y.

Parameters:
x - the affine x-coordinate.
y - the affine y-coordinate.
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - if x or y is null.
Method Detail

getAffineX sample code for java.security.spec.ECPoint.getAffineX() definition code for java.security.spec.ECPoint.getAffineX()

public BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  getAffineX()
Returns the affine x-coordinate x. Note: POINT_INFINITY has a null affine x-coordinate.

Returns:
the affine x-coordinate.

getAffineY sample code for java.security.spec.ECPoint.getAffineY() definition code for java.security.spec.ECPoint.getAffineY()

public BigInteger sample code for java.math.BigInteger definition code for java.math.BigInteger  getAffineY()
Returns the affine y-coordinate y. Note: POINT_INFINITY has a null affine y-coordinate.

Returns:
the affine y-coordinate.

equals sample code for java.security.spec.ECPoint.equals(java.lang.Object) definition code for java.security.spec.ECPoint.equals(java.lang.Object)

public boolean equals(Object sample code for java.lang.Object definition code for java.lang.Object  obj)
Compares this elliptic curve point for equality with the specified object.

Overrides:
equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) in class Object sample code for java.lang.Object definition code for java.lang.Object
Parameters:
obj - the object to be compared.
Returns:
true if obj is an instance of ECPoint and the affine coordinates match, false otherwise.
See Also:
Object.hashCode() sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

hashCode sample code for java.security.spec.ECPoint.hashCode() definition code for java.security.spec.ECPoint.hashCode()

public int hashCode()
Returns a hash code value for this elliptic curve point.

Overrides:
hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
a hash code value.
See Also:
Object.equals(java.lang.Object) sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable