Class AesCipher.Builder
java.lang.Object
cloud.opencode.base.crypto.symmetric.AesCipher.Builder
- Enclosing class:
AesCipher
Builder class for AES cipher.
AES 加密器构建器。
- Since:
- JDK 25, opencode-base-crypto V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the AES cipher instance.keySize(int bits) Set key size in bits.mode(CipherMode mode) Set cipher mode.Set padding scheme.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
keySize
Set key size in bits. 设置密钥大小(比特)。- Parameters:
bits- key size (128, 192, or 256) / 密钥大小(128、192 或 256)- Returns:
- this builder / 当前构建器
-
mode
Set cipher mode. 设置加密模式。- Parameters:
mode- cipher mode / 加密模式- Returns:
- this builder / 当前构建器
-
padding
Set padding scheme. 设置填充方案。- Parameters:
padding- padding scheme / 填充方案- Returns:
- this builder / 当前构建器
-
build
Build the AES cipher instance. 构建 AES 加密实例。- Returns:
- AES cipher instance / AES 加密实例
-