Package at.favre.lib.idmask
Class Config
- java.lang.Object
-
- at.favre.lib.idmask.Config
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Config.Builder
Class for creating configurations for IdMas.
-
Constructor Summary
Constructors Constructor Description Config()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Config.Builder
builder(byte[] key)
Create new builder.static Config.Builder
builder(KeyManager keyManager)
Creates a new build with the following defaults: Base64 encoding Default security provider Using in-memory-lru cache and enables it Default secure random Deterministic ids & high security mode disabled
-
-
-
Method Detail
-
builder
public static Config.Builder builder(KeyManager keyManager)
Creates a new build with the following defaults:- Base64 encoding
- Default security provider
- Using in-memory-lru cache and enables it
- Default secure random
- Deterministic ids & high security mode disabled
- Parameters:
keyManager
- non-null key manager responsible for providing the secret keys for the cryptographic primitives. If only a single key is used:'KeyManager.Factory.with(secretKey);'- Returns:
- builder
-
builder
public static Config.Builder builder(byte[] key)
Create new builder. Shorthand for callingbuilder(KeyManager)
with single key key-manager.- Parameters:
key
- to use as secret key.- Returns:
- builder
-
-