Class SingleTargetMasker

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

public class SingleTargetMasker extends Object implements JsonMasker
  • Constructor Details

  • Method Details

    • mask

      public byte[] mask(byte[] message)
      Specified by:
      mask in interface JsonMasker
    • mask

      public byte[] mask(byte[] input, String targetKey)
      Masks the String values in the given input for all values corresponding to the provided target key. This implementation is optimized for a single target key. Currently, only supports UTF_8/US_ASCII
      Parameters:
      input - the UTF-8 encoded input bytes for which values of the target key are masked
      targetKey - the JSON key for which the String values are masked
      Returns:
      the masked message