- All Implemented Interfaces:
Serializable
,Comparable<WebEncryption.Encryption>
,Constable
- Enclosing interface:
WebEncryption
Enumerates content 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.AES-192 GCM.AES-256 GCM.AES_128_CBC_HMAC_SHA_256 authenticated encryption algorithm.AES_192_CBC_HMAC_SHA_384 authenticated encryption algorithm.AES_256_CBC_HMAC_SHA_512 authenticated encryption algorithm. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic WebEncryption.Encryption
Selects encryption by JOSE enc parameter value.static WebEncryption.Encryption
Returns the enum constant of this class with the specified name.static WebEncryption.Encryption[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AES_128_CBC_HMAC_SHA_256
AES_128_CBC_HMAC_SHA_256 authenticated encryption algorithm.- See Also:
-
AES_192_CBC_HMAC_SHA_384
AES_192_CBC_HMAC_SHA_384 authenticated encryption algorithm.- See Also:
-
AES_256_CBC_HMAC_SHA_512
AES_256_CBC_HMAC_SHA_512 authenticated encryption algorithm.- See Also:
-
A128GCM
AES-128 GCM. -
A192GCM
AES-192 GCM. -
A256GCM
AES-256 GCM.
-
-
Field Details
-
enc
JOSE enc attribute value. -
size
public final int sizeCEK size, in bits. -
algorithm
JCE Cipher algorithm. -
mac
JCE MAC 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
Selects encryption by JOSE enc parameter value.- Parameters:
enc
- JOSE parameter value- Returns:
- encryption
-