Class HybridCrypto.Builder
java.lang.Object
cloud.opencode.base.crypto.envelope.HybridCrypto.Builder
- Enclosing class:
HybridCrypto
Builder for creating custom HybridCrypto instances
用于创建自定义 HybridCrypto 实例的构建器
- Since:
- JDK 25, opencode-base-crypto V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Method Summary
Modifier and TypeMethodDescriptionasymmetricAlgorithm(AsymmetricAlgorithm algorithm) Set asymmetric algorithm for key encryption 设置用于密钥加密的非对称算法build()Build HybridCrypto instance 构建 HybridCrypto 实例symmetricAlgorithm(SymmetricAlgorithm algorithm) Set symmetric algorithm for data encryption 设置用于数据加密的对称算法
-
Method Details
-
asymmetricAlgorithm
Set asymmetric algorithm for key encryption 设置用于密钥加密的非对称算法- Parameters:
algorithm- asymmetric algorithm- Returns:
- this builder for method chaining
- Throws:
NullPointerException- if algorithm is null
-
symmetricAlgorithm
Set symmetric algorithm for data encryption 设置用于数据加密的对称算法- Parameters:
algorithm- symmetric algorithm- Returns:
- this builder for method chaining
- Throws:
NullPointerException- if algorithm is null
-
build
Build HybridCrypto instance 构建 HybridCrypto 实例- Returns:
- new HybridCrypto instance
-