- java.lang.Object
-
- io.helidon.common.crypto.AsymmetricCipher.Builder
-
- All Implemented Interfaces:
Builder<AsymmetricCipher>,Supplier<AsymmetricCipher>
- Enclosing class:
- AsymmetricCipher
public static final class AsymmetricCipher.Builder extends Object implements Builder<AsymmetricCipher>
Builder of theAsymmetricCipher.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AsymmetricCipher.Builderalgorithm(String algorithm)Set algorithm which should be used.AsymmetricCipherbuild()Build the instance from this builder.AsymmetricCipher.BuilderprivateKey(PrivateKey privateKey)Private key which should be used for decryption.AsymmetricCipher.Builderprovider(String provider)Set provider of the algorithm.AsymmetricCipher.BuilderpublicKey(PublicKey publicKey)Public key which should be used for encryption.
-
-
-
Method Detail
-
algorithm
public AsymmetricCipher.Builder algorithm(String 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
public AsymmetricCipher.Builder provider(String provider)
Set provider of the algorithm.- Parameters:
provider- provider to be used- Returns:
- updated builder instance
-
privateKey
public AsymmetricCipher.Builder privateKey(PrivateKey privateKey)
Private key which should be used for decryption.- Parameters:
privateKey- private key- Returns:
- updated builder instance
-
publicKey
public AsymmetricCipher.Builder publicKey(PublicKey publicKey)
Public key which should be used for encryption.- Parameters:
publicKey- public key- Returns:
- updated builder instance
-
build
public AsymmetricCipher build()
Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
buildin interfaceBuilder<AsymmetricCipher>- Returns:
- instance of the built type
-
-