Enum SignatureAlgorithm
- java.lang.Object
-
- java.lang.Enum<SignatureAlgorithm>
-
- io.jans.as.model.crypto.signature.SignatureAlgorithm
-
- All Implemented Interfaces:
Serializable,Comparable<SignatureAlgorithm>
public enum SignatureAlgorithm extends Enum<SignatureAlgorithm>
Signature Algorithms. JWS digital signature and MAC "alg" (algorithm) values (RFC 7518, A.1. Digital Signature/MAC Algorithm Identifier Cross-Reference). CFRG Elliptic Curve Diffie-Hellman (ECDH) and Signatures in JSON Object Signing and Encryption (JOSE) signature algorithm "Ed25519".- Version:
- October 26, 2021
- Author:
- Javier Rojas Blum, Sergey Manoylo
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEF_ED25519static StringDEF_EDDDSAstatic StringDEF_ES256static StringDEF_ES256Kstatic StringDEF_ES384static StringDEF_ES512static StringDEF_HMACSHA256static StringDEF_HMACSHA384static StringDEF_HMACSHA512static StringDEF_HS256static StringDEF_HS384static StringDEF_HS512static StringDEF_PS256static StringDEF_PS384static StringDEF_PS512static StringDEF_RS256static StringDEF_RS384static StringDEF_RS512static StringDEF_SHA256WITHECDSAstatic StringDEF_SHA256WITHRSAstatic StringDEF_SHA256WITHRSAANDMGF1static StringDEF_SHA384WITHECDSAstatic StringDEF_SHA384WITHRSAstatic StringDEF_SHA384WITHRSAANDMGF1static StringDEF_SHA512WITHECDSAstatic StringDEF_SHA512WITHRSAstatic StringDEF_SHA512WITHRSAANDMGF1
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SignatureAlgorithmfromString(String param)Returns the correspondingSignatureAlgorithmfor a parameter alg of the JWK endpoint.static List<SignatureAlgorithm>fromString(String[] params)AlgorithmgetAlg()StringgetAlgorithm()EllipticEdvardsCurvegetCurve()AlgorithmFamilygetFamily()com.nimbusds.jose.JWSAlgorithmgetJwsAlgorithm()Returns this.jwsAlgorithm (JSON Web Signature (JWS) algorithm name)JwtTypegetJwtType()StringgetName()StringtoString()Returns a string representation of the object.static SignatureAlgorithmvalueOf(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
-
EDDSA
public static final SignatureAlgorithm EDDSA
-
-
Field Detail
-
DEF_HS256
public static final String DEF_HS256
- See Also:
- Constant Field Values
-
DEF_HS384
public static final String DEF_HS384
- See Also:
- Constant Field Values
-
DEF_HS512
public static final String DEF_HS512
- See Also:
- Constant Field Values
-
DEF_RS256
public static final String DEF_RS256
- See Also:
- Constant Field Values
-
DEF_RS384
public static final String DEF_RS384
- See Also:
- Constant Field Values
-
DEF_RS512
public static final String DEF_RS512
- See Also:
- Constant Field Values
-
DEF_ES256
public static final String DEF_ES256
- See Also:
- Constant Field Values
-
DEF_ES256K
public static final String DEF_ES256K
- See Also:
- Constant Field Values
-
DEF_ES384
public static final String DEF_ES384
- See Also:
- Constant Field Values
-
DEF_ES512
public static final String DEF_ES512
- See Also:
- Constant Field Values
-
DEF_PS256
public static final String DEF_PS256
- See Also:
- Constant Field Values
-
DEF_PS384
public static final String DEF_PS384
- See Also:
- Constant Field Values
-
DEF_PS512
public static final String DEF_PS512
- See Also:
- Constant Field Values
-
DEF_ED25519
public static final String DEF_ED25519
- See Also:
- Constant Field Values
-
DEF_EDDDSA
public static final String DEF_EDDDSA
- See Also:
- Constant Field Values
-
DEF_HMACSHA256
public static final String DEF_HMACSHA256
- See Also:
- Constant Field Values
-
DEF_HMACSHA384
public static final String DEF_HMACSHA384
- See Also:
- Constant Field Values
-
DEF_HMACSHA512
public static final String DEF_HMACSHA512
- See Also:
- Constant Field Values
-
DEF_SHA256WITHRSA
public static final String DEF_SHA256WITHRSA
- See Also:
- Constant Field Values
-
DEF_SHA384WITHRSA
public static final String DEF_SHA384WITHRSA
- See Also:
- Constant Field Values
-
DEF_SHA512WITHRSA
public static final String DEF_SHA512WITHRSA
- See Also:
- Constant Field Values
-
DEF_SHA256WITHECDSA
public static final String DEF_SHA256WITHECDSA
- See Also:
- Constant Field Values
-
DEF_SHA384WITHECDSA
public static final String DEF_SHA384WITHECDSA
- See Also:
- Constant Field Values
-
DEF_SHA512WITHECDSA
public static final String DEF_SHA512WITHECDSA
- See Also:
- Constant Field Values
-
DEF_SHA256WITHRSAANDMGF1
public static final String DEF_SHA256WITHRSAANDMGF1
- See Also:
- Constant Field Values
-
DEF_SHA384WITHRSAANDMGF1
public static final String DEF_SHA384WITHRSAANDMGF1
- See Also:
- Constant Field Values
-
DEF_SHA512WITHRSAANDMGF1
public static final 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(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getAlg
public Algorithm getAlg()
-
getName
public String getName()
-
getFamily
public AlgorithmFamily getFamily()
-
getAlgorithm
public String getAlgorithm()
-
getCurve
public EllipticEdvardsCurve getCurve()
-
getJwtType
public JwtType getJwtType()
-
fromString
public static List<SignatureAlgorithm> fromString(String[] params)
-
fromString
public static SignatureAlgorithm fromString(String param)
Returns the correspondingSignatureAlgorithmfor a parameter alg of the JWK endpoint.- Parameters:
param- The alg parameter.- Returns:
- The corresponding alg if found, otherwise
null.
-
toString
public String toString()
Returns a string representation of the object. In this case the parameter name.- Overrides:
toStringin classEnum<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)
-
-