Enum Class SignatureAlgorithm
- All Implemented Interfaces:
Serializable
,Comparable<SignatureAlgorithm>
,Constable
,JwaAlgorithm
,JwsAlgorithm
An enumeration of the cryptographic algorithms defined by the JSON Web Algorithms (JWA)
specification and used by JSON Web Signature (JWS) to digitally sign the contents of
the JWS Protected Header and JWS Payload.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionECDSA using P-256 and SHA-256 (Recommended+)ECDSA using P-384 and SHA-384 (Optional)ECDSA using P-521 and SHA-512 (Optional)RSASSA-PSS using SHA-256 and MGF1 with SHA-256 (Optional)RSASSA-PSS using SHA-384 and MGF1 with SHA-384 (Optional)RSASSA-PSS using SHA-512 and MGF1 with SHA-512 (Optional)RSASSA-PKCS1-v1_5 using SHA-256 (Recommended)RSASSA-PKCS1-v1_5 using SHA-384 (Optional)RSASSA-PKCS1-v1_5 using SHA-512 (Optional) -
Method Summary
Modifier and TypeMethodDescriptionstatic SignatureAlgorithm
Attempt to resolve the provided algorithm name to aSignatureAlgorithm
.getName()
Returns the algorithm name.static SignatureAlgorithm
Returns the enum constant of this class with the specified name.static SignatureAlgorithm[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RS256
RSASSA-PKCS1-v1_5 using SHA-256 (Recommended) -
RS384
RSASSA-PKCS1-v1_5 using SHA-384 (Optional) -
RS512
RSASSA-PKCS1-v1_5 using SHA-512 (Optional) -
ES256
ECDSA using P-256 and SHA-256 (Recommended+) -
ES384
ECDSA using P-384 and SHA-384 (Optional) -
ES512
ECDSA using P-521 and SHA-512 (Optional) -
PS256
RSASSA-PSS using SHA-256 and MGF1 with SHA-256 (Optional) -
PS384
RSASSA-PSS using SHA-384 and MGF1 with SHA-384 (Optional) -
PS512
RSASSA-PSS using SHA-512 and MGF1 with SHA-512 (Optional)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getName
Returns the algorithm name.- Specified by:
getName
in interfaceJwaAlgorithm
- Returns:
- the algorithm name
-
from
Attempt to resolve the provided algorithm name to aSignatureAlgorithm
.- Parameters:
name
- the algorithm name- Returns:
- the resolved
SignatureAlgorithm
, ornull
if not found
-