Class KeyContainsMasker

java.lang.Object
dev.blaauwendraad.masker.json.KeyContainsMasker
All Implemented Interfaces:
JsonMasker

public final class KeyContainsMasker extends Object implements JsonMasker
JsonMasker that is optimized to mask the JSON properties for one or multiple target keys. This is the default JsonMasker implementation.
  • Constructor Details

    • KeyContainsMasker

      public KeyContainsMasker(JsonMaskingConfig maskingConfig)
      Creates an instance of an KeyContainsMasker
      Parameters:
      maskingConfig - the masking configurations for the created masker
  • Method Details

    • mask

      public byte[] mask(byte[] input)
      Masks the values in the given input for all values having keys corresponding to any of the provided target keys. This implementation is optimized for multiple target keys. Currently, only supports UTF_8 character encoding
      Specified by:
      mask in interface JsonMasker
      Parameters:
      input - the input message for which values might be masked
      Returns:
      the masked message