java.lang.Object
dev.orne.config.impl.CryptoProviderBuilderImpl
- All Implemented Interfaces:
CryptoProviderBuilder,CryptoProviderEngineBuilder,CryptoProviderKeyBuilder
@API(status=INTERNAL,
since="1.0")
public class CryptoProviderBuilderImpl
extends Object
implements CryptoProviderEngineBuilder, CryptoProviderKeyBuilder, CryptoProviderBuilder
Implementation of configuration values cryptography transformations provider
builder.
- Since:
- 1.0
- Version:
- 1.0, 2025-05
- Author:
- (w) Iker Hernaez
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor.Copy constructor.Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates a new cryptography transformations provider.pooled()EnablesCiphers pooling.withAesGcmEngine(byte[] salt, boolean destroyEngine) Creates a new cryptography transformations provider builder based on Java Cryptography Architecture using AES with GCM symmetric algorithm.withEngine(ConfigCryptoEngine engine, boolean destroyEngine) Sets the cryptography transformations engine to use.withSecretKey(char[] password) Sets the password used as secret key.withSecretKey(SecretKey key) Sets the secret key.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.orne.config.CryptoProviderEngineBuilder
withAesGcmEngine, withEngine
-
Constructor Details
-
CryptoProviderBuilderImpl
public CryptoProviderBuilderImpl()Empty constructor. -
CryptoProviderBuilderImpl
Copy constructor.- Parameters:
copy- The instance to copy.
-
CryptoProviderBuilderImpl
Copy constructor.- Parameters:
options- The cryptography transformations provider options to copy.
-
-
Method Details
-
withEngine
Sets the cryptography transformations engine to use.- Specified by:
withEnginein interfaceCryptoProviderEngineBuilder- Parameters:
engine- The cryptography transformations engine to use.destroyEngine- If the cryptography engine must be destroyed on provider destruction.- Returns:
- Next builder, for method chaining.
-
withAesGcmEngine
Creates a new cryptography transformations provider builder based on Java Cryptography Architecture using AES with GCM symmetric algorithm.- Specified by:
withAesGcmEnginein interfaceCryptoProviderEngineBuilder- Parameters:
salt- The salt to apply to password based secret keys.destroyEngine- If the cryptography engine must be destroyed on provider destruction.- Returns:
- Next builder, for method chaining.
-
withSecretKey
Sets the password used as secret key.- Specified by:
withSecretKeyin interfaceCryptoProviderKeyBuilder- Parameters:
password- The password.- Returns:
- Next builder, for method chaining.
-
withSecretKey
Sets the secret key.- Specified by:
withSecretKeyin interfaceCryptoProviderKeyBuilder- Parameters:
key- The secret key.- Returns:
- Next builder, for method chaining.
-
pooled
EnablesCiphers pooling.- Specified by:
pooledin interfaceCryptoProviderBuilder- Returns:
- This builder, for method chaining.
-
build
Creates a new cryptography transformations provider.- Specified by:
buildin interfaceCryptoProviderBuilder- Returns:
- The cryptography transformations provider.
-