public enum JWEEnc extends Enum<JWEEnc>
"enc" (Encryption Algorithm) Header Parameter Values for JWE.| Enum Constant and Description |
|---|
A128CBC_HS256
"A128CBC-HS256" (1);
Algorithm defined in 5.2.3. AES_128_CBC_HMAC_SHA_256
in RFC 7518. |
A128GCM
"A128GCM" (4); AES GCM using 128 bit key. |
A192CBC_HS384
"A192CBC-HS384" (2);
Algorithm defined in 5.2.4. AES_192_CBC_HMAC_SHA_384
in RFC 7518. |
A192GCM
"A192GCM" (5); AES GCM using 192 bit key. |
A256CBC_HS512
"A256CBC-HS512" (3);
Algorithm defined in 5.2.5. AES_256_CBC_HMAC_SHA_512
in RFC 7518. |
A256GCM
"A256GCM" (6); AES GCM using 256 bit key. |
| Modifier and Type | Method and Description |
|---|---|
static JWEEnc |
getByValue(short value)
Find an instance of this enum by a value.
|
String |
getName()
Get the name of this encryption method.
|
short |
getValue()
Get the integer representation of this enum instance.
|
static JWEEnc |
parse(String alg)
Convert
String to JWEEnc. |
static JWEEnc[] |
toArray(int bits) |
static int |
toBits(EnumSet<JWEEnc> set) |
static EnumSet<JWEEnc> |
toSet(int bits) |
static EnumSet<JWEEnc> |
toSet(JWEEnc[] array) |
String |
toString() |
static JWEEnc |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JWEEnc[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JWEEnc A128CBC_HS256
"A128CBC-HS256" (1);
Algorithm defined in 5.2.3. AES_128_CBC_HMAC_SHA_256
in RFC 7518.public static final JWEEnc A192CBC_HS384
"A192CBC-HS384" (2);
Algorithm defined in 5.2.4. AES_192_CBC_HMAC_SHA_384
in RFC 7518.public static final JWEEnc A256CBC_HS512
"A256CBC-HS512" (3);
Algorithm defined in 5.2.5. AES_256_CBC_HMAC_SHA_512
in RFC 7518.public static final JWEEnc A128GCM
"A128GCM" (4); AES GCM using 128 bit key.public static final JWEEnc A192GCM
"A192GCM" (5); AES GCM using 192 bit key.public static final JWEEnc A256GCM
"A256GCM" (6); AES GCM using 256 bit key.public static JWEEnc[] values()
for (JWEEnc c : JWEEnc.values()) System.out.println(c);
public static JWEEnc valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String getName()
public short getValue()
public static JWEEnc getByValue(short value)
value - The integer representation of the instance to find.null if not found.public static JWEEnc parse(String alg)
String to JWEEnc.alg - Algorithm name. For example, "A128CBC-HS256".JWEEnc instance, or null.public static JWEEnc[] toArray(int bits)
Copyright © 2019. All rights reserved.