mask
Masks a secret value according to the specified strategy.
Example:
SecretMasker.mask("mypassword", MaskStrategy.PARTIAL, 4) // "mypa********"
SecretMasker.mask("apikey999", MaskStrategy.EDGES, 0) // "a*******9"
SecretMasker.mask("secret", MaskStrategy.FULL, 0) // "********"
SecretMasker.mask("", MaskStrategy.FULL, 0) // "********"Content copied to clipboard
Return
The masked string representation.
Since
1.0
Parameters
value
The plaintext value to mask.
strategy
The masking strategy to apply.
visible Chars
Number of leading characters to leave visible (only used by MaskStrategy.PARTIAL).