public class EllipticCurve
extends Object
java.lang.Object | |
↳ | java.security.spec.EllipticCurve |
这个不可变的类拥有表示椭圆曲线所需的必要值。
也可以看看:
Public constructors |
|
---|---|
EllipticCurve(ECField field, BigInteger a, BigInteger b) 用指定的椭圆字段 |
|
EllipticCurve(ECField field, BigInteger a, BigInteger b, byte[] seed) 使用指定的椭圆字段 |
Public methods |
|
---|---|
boolean |
equals(Object obj) 将这个椭圆曲线与指定的对象进行比较。 |
BigInteger |
getA() 返回椭圆曲线的第一个系数 |
BigInteger |
getB() 返回椭圆曲线的第二个系数 |
ECField |
getField() 返回此椭圆曲线结束的有限域 |
byte[] |
getSeed() 返回曲线生成期间使用的播种字节 |
int |
hashCode() 返回此椭圆曲线的哈希码值。 |
Inherited methods |
|
---|---|
From class java.lang.Object
|
EllipticCurve (ECField field, BigInteger a, BigInteger b)
用指定的椭圆字段 field
和系数 a
和 b
创建椭圆曲线。
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 (ECField field, BigInteger a, BigInteger b, byte[] seed)
使用指定的椭圆字段 field
,系数 a
和 b
以及用于曲线生成的 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 . |
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. |
BigInteger getA ()
返回椭圆曲线的第一个系数 a
。
Returns | |
---|---|
BigInteger |
the first coefficient a . |
BigInteger getB ()
返回椭圆曲线的第二个系数 b
。
Returns | |
---|---|
BigInteger |
the second coefficient b . |
ECField getField ()
返回此椭圆曲线结束的有限域 field
。
Returns | |
---|---|
ECField |
the field field that this curve is over. |
byte[] getSeed ()
返回曲线生成过程中使用的播种字节seed
。 如果未指定,可能为null。
Returns | |
---|---|
byte[] |
the seeding bytes seed . A new array is returned each time this method is called. |
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) |