Adds a transformer to the parser.
An instance of a class extending MaskingTransformer.
Masks the provided message using the added transformers. This method sequentially applies each transformer's masking logic to the message. It utilizes a state map to track original values corresponding to their masked versions.
The message to be masked.
A masked version of the message.
Rehydrates a masked message back to its original form. This method sequentially applies the rehydration logic of each added transformer in reverse order. It relies on the state map to correctly map the masked values back to their original values.
The rehydration process is essential for restoring the original content of a message that has been transformed (masked) by the transformers. This process is the inverse of the masking process.
The masked message to be rehydrated.
Optional
state: Map<string, string>The original (rehydrated) version of the message.
MaskingParser class for handling the masking and rehydrating of messages.