Enum Class Padding
- All Implemented Interfaces:
Serializable, Comparable<Padding>, Constable
Padding scheme enumeration for block cipher algorithms.
分组密码算法的填充方案枚举。
Features | 主要功能:
- PKCS5, PKCS7, NoPadding definitions - PKCS5、PKCS7、NoPadding 定义
Usage Examples | 使用示例:
Padding padding = Padding.PKCS5;
String name = padding.paddingName();
Security | 安全性:
- Thread-safe: Yes - 线程安全: 是
- Null-safe: Partial - 空值安全: 部分
- Since:
- JDK 25, opencode-base-crypto V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionISO 10126 padding scheme.No padding - Plaintext must be multiple of block size.PKCS5 padding scheme.PKCS7 padding scheme - Recommended. -
Method Summary
-
Enum Constant Details
-
NO_PADDING
No padding - Plaintext must be multiple of block size. 无填充 - 明文必须是块大小的倍数。 -
PKCS5
PKCS5 padding scheme. PKCS5 填充方案。 -
PKCS7
PKCS7 padding scheme - Recommended. PKCS7 填充方案 - 推荐使用。 Note: JCE uses "PKCS5Padding" which is functionally equivalent to PKCS7 for AES. 注意:JCE 使用 "PKCS5Padding",对于 AES 来说与 PKCS7 功能等效。 -
ISO10126
ISO 10126 padding scheme. ISO 10126 填充方案。
-
-
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
-
getValue
Get the JCE padding scheme name. 获取 JCE 填充方案名称。- Returns:
- JCE padding scheme name / JCE 填充方案名称
-