Most visited

Recently visited

Added in API level 1

EllipticCurve

public class EllipticCurve
extends Object

java.lang.Object
   ↳ java.security.spec.EllipticCurve


这个不可变的类拥有表示椭圆曲线所需的必要值。

也可以看看:

Summary

Public constructors

EllipticCurve(ECField field, BigInteger a, BigInteger b)

用指定的椭圆字段 field和系数 ab创建椭圆曲线。

EllipticCurve(ECField field, BigInteger a, BigInteger b, byte[] seed)

使用指定的椭圆字段 field ,系数 ab以及用于曲线生成的 seed创建椭圆曲线。

Public methods

boolean equals(Object obj)

将这个椭圆曲线与指定的对象进行比较。

BigInteger getA()

返回椭圆曲线的第一个系数 a

BigInteger getB()

返回椭圆曲线的第二个系数 b

ECField getField()

返回此椭圆曲线结束的有限域 field

byte[] getSeed()

返回曲线生成期间使用的播种字节 seed

int hashCode()

返回此椭圆曲线的哈希码值。

Inherited methods

From class java.lang.Object

Public constructors

EllipticCurve

Added in API level 1
EllipticCurve (ECField field, 
                BigInteger a, 
                BigInteger b)

用指定的椭圆字段 field和系数 ab创建椭圆曲线。

Parameters
field ECField: the finite field that this elliptic curve is over.
a BigInteger: the first coefficient of this elliptic curve.
b BigInteger: the second coefficient of this elliptic curve.
Throws
NullPointerException if field, a, or b is null.
IllegalArgumentException if a or b is not null and not in field.

EllipticCurve

Added in API level 1
EllipticCurve (ECField field, 
                BigInteger a, 
                BigInteger b, 
                byte[] seed)

使用指定的椭圆字段 field ,系数 ab以及用于曲线生成的 seed创建椭圆曲线。

Parameters
field ECField: the finite field that this elliptic curve is over.
a BigInteger: the first coefficient of this elliptic curve.
b BigInteger: the second coefficient of this elliptic curve.
seed byte: the bytes used during curve generation for later validation. Contents of this array are copied to protect against subsequent modification.
Throws
NullPointerException if field, a, or b is null.
IllegalArgumentException if a or b is not null and not in field.

Public methods

equals

Added in API level 1
boolean equals (Object obj)

将这个椭圆曲线与指定的对象进行比较。

Parameters
obj Object: the object to be compared.
Returns
boolean true if obj is an instance of EllipticCurve and the field, A, and B match, false otherwise.

getA

Added in API level 1
BigInteger getA ()

返回椭圆曲线的第一个系数 a

Returns
BigInteger the first coefficient a.

getB

Added in API level 1
BigInteger getB ()

返回椭圆曲线的第二个系数 b

Returns
BigInteger the second coefficient b.

getField

Added in API level 1
ECField getField ()

返回此椭圆曲线结束的有限域 field

Returns
ECField the field field that this curve is over.

getSeed

Added in API level 1
byte[] getSeed ()

返回曲线生成过程中使用的播种字节seed 如果未指定,可能为null。

Returns
byte[] the seeding bytes seed. A new array is returned each time this method is called.

hashCode

Added in API level 1
int hashCode ()

返回此椭圆曲线的哈希码值。

Returns
int a hash code value computed from the hash codes of the field, A, and B, as follows: (field.hashCode() << 6) + (a.hashCode() << 4) + (b.hashCode() << 2)

Hooray!