@Immutable public static class ECKey.Curve extends Object
Modifier and Type | Field and Description |
---|---|
static ECKey.Curve |
P_256
P-256 curve (secp256r1).
|
static ECKey.Curve |
P_384
P-384 curve (secp384r1).
|
static ECKey.Curve |
P_521
P-521 curve (secp521r1).
|
Constructor and Description |
---|
ECKey.Curve(String name)
Creates a new cryptographic curve with the specified name.
|
ECKey.Curve(String name,
String stdName)
Creates a new cryptographic curve with the specified name.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object)
Overrides
Object.equals() . |
static ECKey.Curve |
forStdName(String stdName)
Gets the cryptographic curve for the specified standard
(JCA) name.
|
String |
getName()
Gets the name of this cryptographic curve.
|
String |
getStdName()
Gets the standard (JCA) name of this cryptographic curve.
|
static ECKey.Curve |
parse(String s)
Parses a cryptographic curve from the specified string.
|
ECParameterSpec |
toECParameterSpec()
Gets the Elliptic Curve parameter specification for this
cryptographic curve.
|
String |
toString() |
public static final ECKey.Curve P_256
public static final ECKey.Curve P_384
public static final ECKey.Curve P_521
public ECKey.Curve(String name)
name
- The name of the cryptographic curve. Must not be
null
.public ECKey.Curve(String name, String stdName)
name
- The JOSE name of the cryptographic curve.
Must not be null
.stdName
- The standard (JCA) name of the cryptographic
curve, null
if not specified.public String getStdName()
public ECParameterSpec toECParameterSpec()
null
if this
cryptographic curve has no standard (JCA) name
specified or if lookup of the EC parameters failed.public static ECKey.Curve parse(String s)
s
- The string to parse. Must not be null
or
empty.public static ECKey.Curve forStdName(String stdName)
stdName
- The standard (JCA) name. Must not be
null
.IllegalArgumentException
- If no matching JOSE curve
constant could be found.Copyright © 2014 Connect2id Ltd.. All Rights Reserved.