Class Config


  • public abstract class Config
    extends Object
    Configuration to create a new IdMask instance.
    • Constructor Detail

      • Config

        public Config()
    • 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 calling builder(KeyManager) with single key key-manager.
        Parameters:
        key - to use as secret key.
        Returns:
        builder