Package uk.co.spudsoft.jwtvalidatorvertx
Enum Class JsonWebAlgorithm
- All Implemented Interfaces:
Serializable
,Comparable<JsonWebAlgorithm>
,Constable
Algorithm for use with JWTs as specified by RFC7518.
https://datatracker.ietf.org/doc/html/rfc7518.
Where algorithms are defined in RFC7518 the description for the algorithm is that found there.
- Author:
- jtalbut
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionEdDSA using P-521 and SHA-512.ECDSA using P-256 and SHA-256.ECDSA using P-384 and SHA-384.ECDSA using P-521 and SHA-512.HMAC using SHA-256.HMAC using SHA-384.HMAC using SHA-512.No digital signature or MAC performed.RSASSA-PSS using SHA-256 and MGF1 with SHA-256.RSASSA-PSS using SHA-384 and MGF1 with SHA-384.RSASSA-PSS using SHA-512 and MGF1 with SHA-512.RSASSA-PKCS-v1_5 using SHA-256.RSASSA-PKCS-v1_5 using SHA-384.RSASSA-PKCS-v1_5 using SHA-512. -
Method Summary
Modifier and TypeMethodDescriptionGet the name of the family of algorithms that this belongs to.Get the name of the algorithm, in JDK terminology.int
Get the minimum length of keys for this algorithm.getName()
Get the name of the algorithm, in JWT terminology.Get the parameter spec needed for configuring a signer.Get any sub-name that the algorithm may have.static JsonWebAlgorithm
Returns the enum constant of this class with the specified name.static JsonWebAlgorithm[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HS256
HMAC using SHA-256. -
HS384
HMAC using SHA-384. -
HS512
HMAC using SHA-512. -
RS256
RSASSA-PKCS-v1_5 using SHA-256. -
RS384
RSASSA-PKCS-v1_5 using SHA-384. -
RS512
RSASSA-PKCS-v1_5 using SHA-512. -
ES256
ECDSA using P-256 and SHA-256. -
ES384
ECDSA using P-384 and SHA-384. -
ES512
ECDSA using P-521 and SHA-512. -
PS256
RSASSA-PSS using SHA-256 and MGF1 with SHA-256. -
PS384
RSASSA-PSS using SHA-384 and MGF1 with SHA-384. -
PS512
RSASSA-PSS using SHA-512 and MGF1 with SHA-512. -
none
No digital signature or MAC performed. -
EdDSA
EdDSA using P-521 and SHA-512.
-
-
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
Get the name of the algorithm, in JWT terminology.- Returns:
- the name of the algorithm, in JWT terminology.
-
getJdkAlgName
Get the name of the algorithm, in JDK terminology.- Returns:
- the name of the algorithm, in JDK terminology.
-
getFamilyName
Get the name of the family of algorithms that this belongs to.- Returns:
- the name of the family of algorithms that this belongs to.
-
getMinKeyLength
public int getMinKeyLength()Get the minimum length of keys for this algorithm.- Returns:
- the minimum length of keys for this algorithm.
-
getSubName
Get any sub-name that the algorithm may have.- Returns:
- any sub-name that the algorithm may have.
-
getParameter
Get the parameter spec needed for configuring a signer.- Returns:
- the parameter spec needed for configuring a signer, may be null.
-