Enum Class AesSpec.Padding
- All Implemented Interfaces:
Serializable, Comparable<AesSpec.Padding>, Constable
- Enclosing class:
AesSpec
Padding schemes for CBC mode.
GCM and CTR always use NOPADDING.
- Since:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNo padding.PKCS#5 padding (recommended for CBC) available in the Standard JDK21+. -
Method Summary
Modifier and TypeMethodDescriptionstatic AesSpec.PaddingReturns the enum constant of this class with the specified name.static AesSpec.Padding[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NOPADDING
No padding.Use only when the plaintext length is an exact multiple of the AES block size (16 bytes). Applicable to CBC; mandatory for GCM/CTR.
-
PKCS5PADDING
PKCS#5 padding (recommended for CBC) available in the Standard JDK21+.
-
-
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
-