public enum JwsAlgorithm extends Enum<JwsAlgorithm> implements Algorithm
Enum Constant and Description |
---|
EDDSA
Edwards Curve DSA (EdDSA), as defined in RFC 8037.
|
ES256
ECDSA using SHA-256 hash algorithm.
|
ES384
ECDSA using SHA-384 hash algorithm.
|
ES512
ECDSA using SHA-512 hash algorithm.
|
HS256
HMAC using SHA-256 hash algorithm.
|
HS384
HMAC using SHA-384 hash algorithm.
|
HS512
HMAC using SHA-512 hash algorithm.
|
NONE
No digital signature or MAC value included.
|
PS256
RSA-PSS with SHA-256 hash algorithm.
|
PS384
RSA-PSS with SHA-384 hash algorithm.
|
PS512
RSA-PSS with SHA-512 hash algorithm.
|
RS256
RSA using SHA-256 hash algorithm.
|
RS384
RSA using SHA-384 hash algorithm.
|
RS512
RSA using SHA-512 hash algorithm.
|
Modifier and Type | Method and Description |
---|---|
String |
getAlgorithm()
Gets the actual name of the algorithm that is understood by Java cryptographic operations.
|
JwsAlgorithmType |
getAlgorithmType()
Gets the JwsAlgorithmType of the JwsAlgorithm.
|
String |
getEllipticCurveName()
Return the standard name of the elliptic curve definition.
|
String |
getJwaAlgorithmName()
Gets the name of the algorithm as defined in the JWA standard.
|
static JwsAlgorithm |
getJwsAlgorithm(String algorithm)
Deprecated.
Replaced by
parseCryptographicAlgorithm(String) |
String |
getMdAlgorithm()
Returns the Java-friendly name of the message digest algorithm
implementation.
|
AlgorithmParameterSpec |
getParameterSpec()
Gets any parameter spec associated with this algorithm.
|
static JwsAlgorithm |
parseAlgorithm(String algorithm)
Parses the given algorithm string to find the matching JwsAlgorithm enum constant.
|
static JwsAlgorithm |
parseCryptographicAlgorithm(String algorithm)
Parses the given algorithm string to find the matching Java Cryptographic algorithm name.
|
String |
toString()
Turns the JwsAlgorithm constant into a JSON value string.
|
static JwsAlgorithm |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JwsAlgorithm[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JwsAlgorithm NONE
public static final JwsAlgorithm HS256
public static final JwsAlgorithm HS384
public static final JwsAlgorithm HS512
public static final JwsAlgorithm RS256
public static final JwsAlgorithm RS384
public static final JwsAlgorithm RS512
public static final JwsAlgorithm ES256
public static final JwsAlgorithm ES384
public static final JwsAlgorithm ES512
public static final JwsAlgorithm PS256
public static final JwsAlgorithm PS384
public static final JwsAlgorithm PS512
public static final JwsAlgorithm EDDSA
public static JwsAlgorithm[] values()
for (JwsAlgorithm c : JwsAlgorithm.values()) System.out.println(c);
public static JwsAlgorithm 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 String getAlgorithm()
Algorithm
getAlgorithm
in interface Algorithm
public String getJwaAlgorithmName()
Algorithm
getJwaAlgorithmName
in interface Algorithm
public String getMdAlgorithm()
public String getEllipticCurveName()
public JwsAlgorithmType getAlgorithmType()
@Deprecated public static JwsAlgorithm getJwsAlgorithm(String algorithm)
parseCryptographicAlgorithm(String)
algorithm
- The Java Cryptographic string algorithm name.public AlgorithmParameterSpec getParameterSpec()
public static JwsAlgorithm parseCryptographicAlgorithm(String algorithm)
If the given algorithm name does not match the algorithm name of any of the constants, then an IllegalArgumentException will be thrown.
algorithm
- The Java Cryptographic string algorithm name.public static JwsAlgorithm parseAlgorithm(String algorithm)
algorithm
- The signing algorithm.public String toString()
toString
in class Enum<JwsAlgorithm>
Copyright 2010-2022 ForgeRock AS.