Package java.security.spec
Class EllipticCurve
- java.lang.Object
-
- java.security.spec.EllipticCurve
-
public class EllipticCurve extends Object
An Elliptic Curve with its necessary values.
-
-
Constructor Summary
Constructors Constructor Description EllipticCurve(ECField field, BigInteger a, BigInteger b)Creates a newEllipticCurvewith the specified field and coefficients.EllipticCurve(ECField field, BigInteger a, BigInteger b, byte[] seed)Creates a newEllipticCurvewith the specified field, coefficients and seed.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)Returns whether the specified object equals to this elliptic curve.BigIntegergetA()Returns the coefficientaof this elliptic curve.BigIntegergetB()Returns the coefficientbof this elliptic curve.ECFieldgetField()Returns the finite field of this elliptic curve.byte[]getSeed()Returns a copy of the seed that was used to generate this elliptic curve.inthashCode()Returns the hashcode of this elliptic curve.
-
-
-
Constructor Detail
-
EllipticCurve
public EllipticCurve(ECField field, BigInteger a, BigInteger b, byte[] seed)
Creates a newEllipticCurvewith the specified field, coefficients and seed.- Parameters:
field- the finite field of this elliptic curve.a- the coefficienta.b- the coefficientb.seed- the seed used for the generation of the curve.- Throws:
IllegalArgumentException- if the specified coefficients are not in the specified field.
-
EllipticCurve
public EllipticCurve(ECField field, BigInteger a, BigInteger b)
Creates a newEllipticCurvewith the specified field and coefficients.- Parameters:
field- the finite field of this elliptic curve.a- the coefficienta.b- the coefficientb.- Throws:
IllegalArgumentException- if the specified coefficients are not in the specified field.
-
-
Method Detail
-
getA
public BigInteger getA()
Returns the coefficientaof this elliptic curve.- Returns:
- the coefficient
aof this elliptic curve.
-
getB
public BigInteger getB()
Returns the coefficientbof this elliptic curve.- Returns:
- the coefficient
bof this elliptic curve.
-
getField
public ECField getField()
Returns the finite field of this elliptic curve.- Returns:
- the finite field of this elliptic curve.
-
getSeed
public byte[] getSeed()
Returns a copy of the seed that was used to generate this elliptic curve.- Returns:
- a copy of the seed that was used to generate this elliptic curve,
or
nullif none specified.
-
equals
public boolean equals(Object other)
Returns whether the specified object equals to this elliptic curve.- Overrides:
equalsin classObject- Parameters:
other- the object to compare.- Returns:
trueif the specified object is equal to this elliptic curve, otherwisefalse.- See Also:
Object.hashCode()
-
hashCode
public int hashCode()
Returns the hashcode of this elliptic curve.- Overrides:
hashCodein classObject- Returns:
- the hashcode of this elliptic curve.
- See Also:
Object.equals(java.lang.Object)
-
-