- java.lang.Object
-
- java.lang.Enum<ExemptionMechanism>
-
- io.github.astrapi69.crypt.api.mechanism.ExemptionMechanism
-
- All Implemented Interfaces:
Mechanism
,java.io.Serializable
,java.lang.Comparable<ExemptionMechanism>
public enum ExemptionMechanism extends java.lang.Enum<ExemptionMechanism> implements Mechanism
The enumExemptionMechanism
defines the exemption mechanism names that can be specified in the permission policy file that accompanies an application considered “exempt” from cryptographic restrictions. For more info see: https://docs.oracle.com/en/java/javase/11/docs/specs/security/standard-names.html#exemption-mechanisms
-
-
Enum Constant Summary
Enum Constants Enum Constant Description KEY_ESCROW
The enum constant KEY_ESCROW.KEY_RECOVERY
The enum constant KEY_RECOVERY.KEY_WEAKENING
The enum constant KEY_WEAKENING.UNKNOWN
The enum constant 'UNKNOWN' if the exemption mechanism name is unknown
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
KEY_ESCROW_MECHANISM_NAME
The string constant KEY_ESCROW_MECHANISM_NAMEstatic java.lang.String
KEY_RECOVERY_MECHANISM_NAME
The string constant KEY_RECOVERY_MECHANISM_NAMEstatic java.lang.String
KEY_WEAKENING_MECHANISM_NAME
The string constant KEY_WEAKENING_MECHANISM_NAME-
Fields inherited from interface io.github.astrapi69.crypt.api.mechanism.Mechanism
UNKNOWN_MECHANISM_NAME
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getMechanism()
Gets the mechanismstatic ExemptionMechanism
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ExemptionMechanism[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
KEY_ESCROW
public static final ExemptionMechanism KEY_ESCROW
The enum constant KEY_ESCROW. An encryption system with a backup decryption capability that allows authorized persons (users, officers of an organization, and government officials), under certain prescribed conditions, to decrypt ciphertext with the help of information supplied by one or more trusted parties who hold special data recovery keys.
-
KEY_RECOVERY
public static final ExemptionMechanism KEY_RECOVERY
The enum constant KEY_RECOVERY. A method of obtaining the secret key used to lock encrypted data. One use is as a means of providing fail-safe access to a corporation’s own encrypted information in times of disaster.
-
KEY_WEAKENING
public static final ExemptionMechanism KEY_WEAKENING
The enum constant KEY_WEAKENING. A method in which a part of the key can be escrowed or recovered.
-
UNKNOWN
public static final ExemptionMechanism UNKNOWN
The enum constant 'UNKNOWN' if the exemption mechanism name is unknown
-
-
Field Detail
-
KEY_ESCROW_MECHANISM_NAME
public static final java.lang.String KEY_ESCROW_MECHANISM_NAME
The string constant KEY_ESCROW_MECHANISM_NAME- See Also:
- Constant Field Values
-
KEY_RECOVERY_MECHANISM_NAME
public static final java.lang.String KEY_RECOVERY_MECHANISM_NAME
The string constant KEY_RECOVERY_MECHANISM_NAME- See Also:
- Constant Field Values
-
KEY_WEAKENING_MECHANISM_NAME
public static final java.lang.String KEY_WEAKENING_MECHANISM_NAME
The string constant KEY_WEAKENING_MECHANISM_NAME- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static ExemptionMechanism[] 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 (ExemptionMechanism c : ExemptionMechanism.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ExemptionMechanism valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getMechanism
public java.lang.String getMechanism()
Gets the mechanism- Specified by:
getMechanism
in interfaceMechanism
- Returns:
- the mechanism
-
-