Enum Class VoidSpec
- All Implemented Interfaces:
Serializable, Comparable<VoidSpec>, Constable, ContextSpec
Context specification for algorithms that require no additional parameters.
Many algorithms do not define per-operation configuration beyond the key
itself. In such cases, the VoidSpec singleton is used as a
placeholder to satisfy generic APIs that expect a ContextSpec.
Usage
CryptoContext ctx = algo.createContext(KeyUsage.SIGN, privateKey, VoidSpec.INSTANCE);
Since this type has no state, all equality checks resolve to the same single
instance INSTANCE.
- Since:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSingleton instance representing the absence of per-operation parameters. -
Method Summary
-
Enum Constant Details
-
INSTANCE
Singleton instance representing the absence of per-operation parameters.
-
-
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
-