Class AsymmetricCipher.Builder
java.lang.Object
io.helidon.common.crypto.AsymmetricCipher.Builder
- All Implemented Interfaces:
Builder<AsymmetricCipher.Builder, AsymmetricCipher>, Supplier<AsymmetricCipher>
- Enclosing class:
AsymmetricCipher
public static final class AsymmetricCipher.Builder
extends Object
implements Builder<AsymmetricCipher.Builder, AsymmetricCipher>
Builder of the
AsymmetricCipher.-
Method Summary
Modifier and TypeMethodDescriptionSet algorithm which should be used.build()Build the instance from this builder.privateKey(PrivateKey privateKey) Private key which should be used for decryption.Set provider of the algorithm.Public key which should be used for encryption.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault AsymmetricCipherget()default AsymmetricCipher.Builderidentity()Instance of this builder as the correct type.default AsymmetricCipher.Builderupdate(Consumer<AsymmetricCipher.Builder> consumer) Update the builder in a fluent API way.
-
Method Details
-
algorithm
Set algorithm which should be used.
Default value isAsymmetricCipher.ALGORITHM_RSA_ECB_OAEP256.- Parameters:
algorithm- algorithm to be used- Returns:
- updated builder instance
-
provider
Set provider of the algorithm.- Parameters:
provider- provider to be used- Returns:
- updated builder instance
-
privateKey
Private key which should be used for decryption.- Parameters:
privateKey- private key- Returns:
- updated builder instance
-
publicKey
Public key which should be used for encryption.- Parameters:
publicKey- public key- Returns:
- updated builder instance
-
build
Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
buildin interfaceBuilder<AsymmetricCipher.Builder, AsymmetricCipher>- Returns:
- instance of the built type
-