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) |
|
|---|---|
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) |