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.
-
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:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<AsymmetricCipher.Builder,
AsymmetricCipher> - Returns:
- instance of the built type
-