Enum SignatureAlgorithm
- java.lang.Object
-
- java.lang.Enum<SignatureAlgorithm>
-
- io.jans.as.model.crypto.signature.SignatureAlgorithm
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<SignatureAlgorithm>
public enum SignatureAlgorithm extends java.lang.Enum<SignatureAlgorithm>
- Version:
- February 12, 2019
- Author:
- Javier Rojas Blum
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SignatureAlgorithm
fromString(java.lang.String param)
Returns the correspondingSignatureAlgorithm
for a parameter alg of the JWK endpoint.static java.util.List<SignatureAlgorithm>
fromString(java.lang.String[] params)
Algorithm
getAlg()
java.lang.String
getAlgorithm()
EllipticEdvardsCurve
getCurve()
AlgorithmFamily
getFamily()
com.nimbusds.jose.JWSAlgorithm
getJwsAlgorithm()
JwtType
getJwtType()
java.lang.String
getName()
java.lang.String
toString()
Returns a string representation of the object.static SignatureAlgorithm
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static SignatureAlgorithm[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final SignatureAlgorithm NONE
-
HS256
public static final SignatureAlgorithm HS256
-
HS384
public static final SignatureAlgorithm HS384
-
HS512
public static final SignatureAlgorithm HS512
-
RS256
public static final SignatureAlgorithm RS256
-
RS384
public static final SignatureAlgorithm RS384
-
RS512
public static final SignatureAlgorithm RS512
-
ES256
public static final SignatureAlgorithm ES256
-
ES384
public static final SignatureAlgorithm ES384
-
ES512
public static final SignatureAlgorithm ES512
-
PS256
public static final SignatureAlgorithm PS256
-
PS384
public static final SignatureAlgorithm PS384
-
PS512
public static final SignatureAlgorithm PS512
-
-
Method Detail
-
values
public static SignatureAlgorithm[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SignatureAlgorithm c : SignatureAlgorithm.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SignatureAlgorithm valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getAlg
public Algorithm getAlg()
-
getName
public java.lang.String getName()
-
getFamily
public AlgorithmFamily getFamily()
-
getAlgorithm
public java.lang.String getAlgorithm()
-
getCurve
public EllipticEdvardsCurve getCurve()
-
getJwtType
public JwtType getJwtType()
-
fromString
public static java.util.List<SignatureAlgorithm> fromString(java.lang.String[] params)
-
fromString
public static SignatureAlgorithm fromString(java.lang.String param)
Returns the correspondingSignatureAlgorithm
for a parameter alg of the JWK endpoint.- Parameters:
param
- The alg parameter.- Returns:
- The corresponding alg if found, otherwise
null
.
-
toString
public java.lang.String toString()
Returns a string representation of the object. In this case the parameter name.- Overrides:
toString
in classjava.lang.Enum<SignatureAlgorithm>
- Returns:
- The string representation of the object.
-
getJwsAlgorithm
public com.nimbusds.jose.JWSAlgorithm getJwsAlgorithm()
-
-