public class LogUtil
extends java.lang.Object
| Constructor and Description |
|---|
LogUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
mask(java.lang.String input)
Return masked input text.
|
static java.lang.String |
singleQuote(java.lang.String value)
Wrap the value in single quotes, or return null if value is null
|
public static java.lang.String mask(java.lang.String input)
Masking checks the length of input. If less than 8 it returns '**********'. If less than 20 it prints out first letter in clear text, and then additional 9x '*' irrespective of actual input size. If input length is greater than 20 chars, it prints out first 4 in clear text followed by '***..***' followed by last 4.
The idea is to give some information for debugging while not leaking too much information about secrets.
input - String with sensitive date which should be maskedpublic static java.lang.String singleQuote(java.lang.String value)
value - The value to wrap in single quotesCopyright © 2024. All rights reserved.