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.CryptoProviderBuilderImpl(@NotNull CryptoProviderBuilderImpl copy) Copy constructor.CryptoProviderBuilderImpl(@NotNull CryptoProviderOptions options) Copy constructor. -
Method Summary
Modifier and TypeMethodDescription@NotNull ConfigCryptoProviderbuild()Creates a new cryptography transformations provider.@NotNull CryptoProviderBuilderImplpooled()EnablesCiphers pooling.@NotNull CryptoProviderBuilderImplwithAesGcmEngine(@javax.validation.constraints.NotNull byte[] salt, boolean destroyEngine) Creates a new cryptography transformations provider builder based on Java Cryptography Architecture using AES with GCM symmetric algorithm.@NotNull CryptoProviderBuilderImplwithEngine(@NotNull ConfigCryptoEngine engine, boolean destroyEngine) Sets the cryptography transformations engine to use.@NotNull CryptoProviderBuilderImplwithSecretKey(@javax.validation.constraints.NotNull char[] password) Sets the password used as secret key.@NotNull CryptoProviderBuilderImplwithSecretKey(@NotNull 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
@NotNull public @NotNull CryptoProviderBuilderImpl withEngine(@NotNull @NotNull ConfigCryptoEngine engine, boolean destroyEngine) 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
@NotNull public @NotNull CryptoProviderBuilderImpl withAesGcmEngine(@NotNull @javax.validation.constraints.NotNull byte[] salt, boolean destroyEngine) 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
@NotNull public @NotNull CryptoProviderBuilderImpl withSecretKey(@NotNull @javax.validation.constraints.NotNull char[] password) 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.
-