java.lang.Object
io.helidon.common.crypto.SymmetricCipher.Builder
- All Implemented Interfaces:
Builder<SymmetricCipher.Builder,
,SymmetricCipher> Supplier<SymmetricCipher>
- Enclosing class:
- SymmetricCipher
public static class SymmetricCipher.Builder
extends Object
implements Builder<SymmetricCipher.Builder,SymmetricCipher>
Builder of the
SymmetricCipher
.-
Method Summary
Modifier and TypeMethodDescriptionSet algorithm which should be used.build()
Build the instance from this builder.keySize
(int keySize) Set size of the key (in bits) which should be generated.numberOfIterations
(int numberOfIterations) Number of iterations which will be used for key derivation from the password.password
(char[] password) Set password upon which the cryptography key will be generated.Set provider of the algorithm.
-
Method Details
-
algorithm
Set algorithm which should be used.
Default value isSymmetricCipher.ALGORITHM_AES_GCM
.- 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
-
password
Set password upon which the cryptography key will be generated.- Parameters:
password
- base password- Returns:
- updated builder instance
-
keySize
Set size of the key (in bits) which should be generated. Default value is 256 bit.- Parameters:
keySize
- size of the key- Returns:
- updated builder instance
-
numberOfIterations
Number of iterations which will be used for key derivation from the password. Default value is 10000.- Parameters:
numberOfIterations
- number of iterations- Returns:
- updated builder instance
-
build
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<SymmetricCipher.Builder,
SymmetricCipher> - Returns:
- instance of the built type
-