Interface JsonMasker

All Known Implementing Classes:
KeyContainsMasker

public interface JsonMasker
Masker that can be used to mask JSON objects and arrays.
  • Method Details

    • getMasker

      @Nonnull static JsonMasker getMasker(String targetKey)
      Creates a default JsonMasker with the provided target key.
      Parameters:
      targetKey - the key to target
      Returns:
      the JsonMasker instance
    • getMasker

      @Nonnull static JsonMasker getMasker(Set<String> targetKeys)
      Creates a default JsonMasker with the provided target key(s).
      Parameters:
      targetKeys - the key(s) to target
      Returns:
      the JsonMasker instance
    • getMasker

      @Nonnull static JsonMasker getMasker(JsonMaskingConfig maskingConfig)
      Creates a JsonMasker with the provided JsonMaskingConfig.
      Parameters:
      maskingConfig - the JSON masker configuration
      Returns:
      a new JsonMasker instance corresponding to the provided JsonMaskingConfig
    • mask

      byte[] mask(byte[] input)
      Masks the given JSON input and returns the masked output.
      Parameters:
      input - the JSON input as bytes
      Returns:
      the masked JSON output as bytes
    • mask

      @Nonnull default String mask(String input)
      Masks the given JSON input and returns the masked output.
      Parameters:
      input - the JSON input as String
      Returns:
      the masked JSON output String