- All Implemented Interfaces:
Serializable
,Comparable<WebKey.Algorithm>
,Constable
- Enclosing interface:
WebKey
Enumerates supported signature and encryption algorithms.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAES-128 GCM Key Wrap.AES-128 Key Wrap.AES-192 GCM Key Wrap.AES-192 Key Wrap.AES-256 GCM Key Wrap.AES-256 Key Wrap.Direct use (as CEK).Elliptic Curve Diffie-Hellman Ephemeral Static key agreement.Elliptic Curve Diffie-Hellman Ephemeral Static key agreement w/ AES-128 Key Wrap.Elliptic Curve Diffie-Hellman Ephemeral Static key agreement w/ AES-192 Key Wrap.Elliptic Curve Diffie-Hellman Ephemeral Static key agreement w/ AES-256 Key Wrap.Edwards Elliptic Curve Digital Signature Algorithm.Elliptic Curve signature w/ SHA-256.Elliptic Curve signature w/ SHA-384.Elliptic Curve signature w/ SHA-512.HMAC symmetric key signature w/ SHA-256.HMAC symmetric key signature w/ SHA-384.HMAC symmetric key signature w/ SHA-512.PBKDF2 with HMAC SHA-256 and AES128 key wrap.PBKDF2 with HMAC SHA-384 and AES192 key wrap.PBKDF2 with HMAC SHA-512 and AES192 key wrap.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.Deprecated.Deprecated.Deprecated.RSAES OAEP w/ default parameters.RSAES OAEP w/ SHA-256 and MGF-1.Deprecated. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal String
JSON alg attribute value.final String
JCE signature or key agreement algorithm name.final Set
<WebCryptoHeader.Param> Set of encryption parameters used by this algorithm.final WebKey.Operation[]
Key usage associated with this algorithm.final int
Encryption key or signature hash size.final WebKey.Type[]
Key type associated with this algorithm.final WebKey.Use
Key usage associated with this algorithm. -
Method Summary
Modifier and TypeMethodDescriptionstatic WebKey.Algorithm
Gets the value equivalent to the JWK alg attribute.static WebKey.Algorithm
Returns the enum constant of this class with the specified name.static WebKey.Algorithm[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HS256
HMAC symmetric key signature w/ SHA-256. -
HS384
HMAC symmetric key signature w/ SHA-384. -
HS512
HMAC symmetric key signature w/ SHA-512. -
RS256
Deprecated.RSASSA-PKCS1-v1_5 using SHA-256. -
RS384
Deprecated.RSASSA-PKCS1-v1_5 using SHA-384. -
RS512
Deprecated.RSASSA-PKCS1-v1_5 using SHA-512. -
ES256
Elliptic Curve signature w/ SHA-256. -
ES384
Elliptic Curve signature w/ SHA-384. -
ES512
Elliptic Curve signature w/ SHA-512. -
EDDSA
Edwards Elliptic Curve Digital Signature Algorithm. -
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. -
RSA1_5
Deprecated.RSAES-PKCS1-v1_5. -
RSA_OAEP
RSAES OAEP w/ default parameters. -
RSA_OAEP_256
RSAES OAEP w/ SHA-256 and MGF-1. -
A128GCMKW
AES-128 GCM Key Wrap.- See Also:
-
A192GCMKW
AES-192 GCM Key Wrap.- See Also:
-
A256GCMKW
AES-256 GCM Key Wrap.- See Also:
-
A128KW
AES-128 Key Wrap. -
A192KW
AES-192 Key Wrap. -
A256KW
AES-256 Key Wrap. -
DIRECT
Direct use (as CEK). -
ECDH_ES
Elliptic Curve Diffie-Hellman Ephemeral Static key agreement.- See Also:
-
ECDH_ES_A128KW
Elliptic Curve Diffie-Hellman Ephemeral Static key agreement w/ AES-128 Key Wrap.- See Also:
-
ECDH_ES_A192KW
Elliptic Curve Diffie-Hellman Ephemeral Static key agreement w/ AES-192 Key Wrap.- See Also:
-
ECDH_ES_A256KW
Elliptic Curve Diffie-Hellman Ephemeral Static key agreement w/ AES-256 Key Wrap.- See Also:
-
PBES2_HS256_A128KW
PBKDF2 with HMAC SHA-256 and AES128 key wrap. -
PBES2_HS384_A192KW
PBKDF2 with HMAC SHA-384 and AES192 key wrap. -
PBES2_HS512_A256KW
PBKDF2 with HMAC SHA-512 and AES192 key wrap.
-
-
Field Details
-
alg
JSON alg attribute value. -
algorithm
JCE signature or key agreement algorithm name. -
size
public final int sizeEncryption key or signature hash size. -
type
Key type associated with this algorithm. -
use
Key usage associated with this algorithm. -
keyOps
Key usage associated with this algorithm. -
encryptionParams
Set of encryption parameters used by this algorithm.
-
-
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
-
from
Gets the value equivalent to the JWK alg attribute.- Parameters:
alg
- alg attribute value- Returns:
WebKey.Operation
-