public enum JweAlgorithm extends Enum<JweAlgorithm> implements Algorithm
Enum Constant and Description |
---|
A128KW
AES-128 KeyWrap.
|
A192KW
AES-192 KeyWrap.
|
A256KW
AES-256 KeyWrap.
|
DIRECT
Direct encryption with a shared symmetric key.
|
ECDH_ES
Elliptic Curve Diffie-Hellman (ECDH) key agreement, directly using the derived key for encryption.
|
ECDH_ES_A128KW
Elliptic Curve Diffie-Hellman (ECDH) key agreement using the derived key for 128-bit AES Key Wrapping.
|
ECDH_ES_A192KW
Elliptic Curve Diffie-Hellman (ECDH) key agreement using the derived key for 192-bit AES Key Wrapping.
|
ECDH_ES_A256KW
Elliptic Curve Diffie-Hellman (ECDH) key agreement using the derived key for 256-bit AES Key Wrapping.
|
RSA_OAEP
RSA in ECB mode with OAEP with SHA-1 and MGF1 padding.
|
RSA_OAEP_256
RSA in ECB mode with OAEP with SHA-256 and MGF1 with SHA-256 padding.
|
RSAES_PKCS1_V1_5
RSA in ECB mode with PKCS1 Padding.
|
Modifier and Type | Method and Description |
---|---|
String |
getAlgorithm()
Gets the actual name of the algorithm that is understood by Java cryptographic operations.
|
JweAlgorithmType |
getAlgorithmType()
Gets the JweAlgorithmType of the JweAlgorithm.
|
String |
getJwaAlgorithmName()
Gets the name of the algorithm as defined in the JWA standard.
|
JweAlgorithm |
getKeyWrappingAlgorithm()
For ECDH-ES key agreement modes, this indicates the key wrapping mode that should be applied to the resulting
derived key.
|
static JweAlgorithm |
parseAlgorithm(String jwaAlgorithmName)
Parses the given algorithm string to find the matching Jwe algorithm enum constant.
|
String |
toString()
Turns the JweAlgorithm constant into a JSON value string.
|
static JweAlgorithm |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JweAlgorithm[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JweAlgorithm RSAES_PKCS1_V1_5
public static final JweAlgorithm RSA_OAEP
public static final JweAlgorithm RSA_OAEP_256
public static final JweAlgorithm DIRECT
public static final JweAlgorithm A128KW
public static final JweAlgorithm A192KW
public static final JweAlgorithm A256KW
public static final JweAlgorithm ECDH_ES
public static final JweAlgorithm ECDH_ES_A128KW
public static final JweAlgorithm ECDH_ES_A192KW
public static final JweAlgorithm ECDH_ES_A256KW
public static JweAlgorithm[] values()
for (JweAlgorithm c : JweAlgorithm.values()) System.out.println(c);
public static JweAlgorithm 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 getAlgorithm()
Algorithm
getAlgorithm
in interface Algorithm
public String getJwaAlgorithmName()
Algorithm
getJwaAlgorithmName
in interface Algorithm
public JweAlgorithm getKeyWrappingAlgorithm()
DIRECT
mode or one of the A128KW
, A192KW
or
A256KW
symmetric key wrapping modes. For non-ECDH modes this will always be null.public JweAlgorithmType getAlgorithmType()
public static JweAlgorithm parseAlgorithm(String jwaAlgorithmName)
jwaAlgorithmName
- The encryption JWA algorithm name.public String toString()
toString
in class Enum<JweAlgorithm>
Copyright 2010-2022 ForgeRock AS.