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:
- October 26, 2021
- Author:
- Javier Rojas Blum, Sergey Manoylo
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEF_ED25519
static java.lang.String
DEF_ED448
static java.lang.String
DEF_EDDDSA
static java.lang.String
DEF_ES256
static java.lang.String
DEF_ES256K
static java.lang.String
DEF_ES384
static java.lang.String
DEF_ES512
static java.lang.String
DEF_HMACSHA256
static java.lang.String
DEF_HMACSHA384
static java.lang.String
DEF_HMACSHA512
static java.lang.String
DEF_HS256
static java.lang.String
DEF_HS384
static java.lang.String
DEF_HS512
static java.lang.String
DEF_PS256
static java.lang.String
DEF_PS384
static java.lang.String
DEF_PS512
static java.lang.String
DEF_RS256
static java.lang.String
DEF_RS384
static java.lang.String
DEF_RS512
static java.lang.String
DEF_SHA256WITHECDSA
static java.lang.String
DEF_SHA256WITHRSA
static java.lang.String
DEF_SHA256WITHRSAANDMGF1
static java.lang.String
DEF_SHA384WITHECDSA
static java.lang.String
DEF_SHA384WITHRSA
static java.lang.String
DEF_SHA384WITHRSAANDMGF1
static java.lang.String
DEF_SHA512WITHECDSA
static java.lang.String
DEF_SHA512WITHRSA
static java.lang.String
DEF_SHA512WITHRSAANDMGF1
-
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()
Returns this.jwsAlgorithm (JSON Web Signature (JWS) algorithm name)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
-
ES256K
public static final SignatureAlgorithm ES256K
-
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
-
ED25519
public static final SignatureAlgorithm ED25519
-
ED448
public static final SignatureAlgorithm ED448
-
EDDSA
public static final SignatureAlgorithm EDDSA
-
-
Field Detail
-
DEF_HS256
public static final java.lang.String DEF_HS256
- See Also:
- Constant Field Values
-
DEF_HS384
public static final java.lang.String DEF_HS384
- See Also:
- Constant Field Values
-
DEF_HS512
public static final java.lang.String DEF_HS512
- See Also:
- Constant Field Values
-
DEF_RS256
public static final java.lang.String DEF_RS256
- See Also:
- Constant Field Values
-
DEF_RS384
public static final java.lang.String DEF_RS384
- See Also:
- Constant Field Values
-
DEF_RS512
public static final java.lang.String DEF_RS512
- See Also:
- Constant Field Values
-
DEF_ES256
public static final java.lang.String DEF_ES256
- See Also:
- Constant Field Values
-
DEF_ES256K
public static final java.lang.String DEF_ES256K
- See Also:
- Constant Field Values
-
DEF_ES384
public static final java.lang.String DEF_ES384
- See Also:
- Constant Field Values
-
DEF_ES512
public static final java.lang.String DEF_ES512
- See Also:
- Constant Field Values
-
DEF_PS256
public static final java.lang.String DEF_PS256
- See Also:
- Constant Field Values
-
DEF_PS384
public static final java.lang.String DEF_PS384
- See Also:
- Constant Field Values
-
DEF_PS512
public static final java.lang.String DEF_PS512
- See Also:
- Constant Field Values
-
DEF_ED25519
public static final java.lang.String DEF_ED25519
- See Also:
- Constant Field Values
-
DEF_ED448
public static final java.lang.String DEF_ED448
- See Also:
- Constant Field Values
-
DEF_EDDDSA
public static final java.lang.String DEF_EDDDSA
- See Also:
- Constant Field Values
-
DEF_HMACSHA256
public static final java.lang.String DEF_HMACSHA256
- See Also:
- Constant Field Values
-
DEF_HMACSHA384
public static final java.lang.String DEF_HMACSHA384
- See Also:
- Constant Field Values
-
DEF_HMACSHA512
public static final java.lang.String DEF_HMACSHA512
- See Also:
- Constant Field Values
-
DEF_SHA256WITHRSA
public static final java.lang.String DEF_SHA256WITHRSA
- See Also:
- Constant Field Values
-
DEF_SHA384WITHRSA
public static final java.lang.String DEF_SHA384WITHRSA
- See Also:
- Constant Field Values
-
DEF_SHA512WITHRSA
public static final java.lang.String DEF_SHA512WITHRSA
- See Also:
- Constant Field Values
-
DEF_SHA256WITHECDSA
public static final java.lang.String DEF_SHA256WITHECDSA
- See Also:
- Constant Field Values
-
DEF_SHA384WITHECDSA
public static final java.lang.String DEF_SHA384WITHECDSA
- See Also:
- Constant Field Values
-
DEF_SHA512WITHECDSA
public static final java.lang.String DEF_SHA512WITHECDSA
- See Also:
- Constant Field Values
-
DEF_SHA256WITHRSAANDMGF1
public static final java.lang.String DEF_SHA256WITHRSAANDMGF1
- See Also:
- Constant Field Values
-
DEF_SHA384WITHRSAANDMGF1
public static final java.lang.String DEF_SHA384WITHRSAANDMGF1
- See Also:
- Constant Field Values
-
DEF_SHA512WITHRSAANDMGF1
public static final java.lang.String DEF_SHA512WITHRSAANDMGF1
- See Also:
- Constant Field Values
-
-
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()
Returns this.jwsAlgorithm (JSON Web Signature (JWS) algorithm name)- Returns:
- this.jwsAlgorithm (JSON Web Signature (JWS) algorithm name)
-
-