public enum SupportedEllipticCurve extends Enum<SupportedEllipticCurve>
Enum Constant and Description |
---|
P256
NIST P-256.
|
P384
NIST P-384.
|
P521
NIST P-521.
|
Modifier and Type | Method and Description |
---|---|
static SupportedEllipticCurve |
forKey(ECKey key)
Determines the standard curve that matches the given (private or public) key.
|
static SupportedEllipticCurve |
forName(String curveName)
Returns the curve parameters for the given standard curve name (crv claim in a JWK).
|
static SupportedEllipticCurve |
forSignature(byte[] signature)
Determines the supported curve parameters for the given signature.
|
JwsAlgorithm |
getJwsAlgorithm()
Returns the JwsAlgorithm that corresponds to this elliptic curve.
|
ECParameterSpec |
getParameters()
Returns the parameters for the given elliptic curve.
|
int |
getSignatureSize()
Returns the size of the signature produced by this curve in octets.
|
String |
getStandardName()
Return the name of the curve as used for the "crv" claim in a JWK.
|
static SupportedEllipticCurve |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SupportedEllipticCurve[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SupportedEllipticCurve P256
public static final SupportedEllipticCurve P384
public static final SupportedEllipticCurve P521
public static SupportedEllipticCurve[] values()
for (SupportedEllipticCurve c : SupportedEllipticCurve.values()) System.out.println(c);
public static SupportedEllipticCurve valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic ECParameterSpec getParameters()
public String getStandardName()
public int getSignatureSize()
public JwsAlgorithm getJwsAlgorithm()
public static SupportedEllipticCurve forName(String curveName)
curveName
- the curve name.IllegalArgumentException
- if the curve name is not supported.public static SupportedEllipticCurve forKey(ECKey key)
key
- the private or public key to determine the curve for.IllegalArgumentException
- if the key does not match any supported curve parameters.public static SupportedEllipticCurve forSignature(byte[] signature)
signature
- the signature to match.IllegalArgumentException
- if the signature does not match any supported curve parameters.Copyright © 2025 Open Identity Platform Community. All rights reserved.