public class Masker extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
MASK_CC_AMEX_REGEX |
protected static String |
MASK_CC_DINERS_REGEX |
protected static String |
MASK_CC_DISCOVER_REGEX |
protected static String |
MASK_CC_MASTERCARD_REGEX |
protected static String |
MASK_CC_VISA_REGEX |
static String |
MASK_CREDITCARD |
static String |
MASK_IP |
protected static String |
MASK_IPV4_REGEX |
static String |
MASK_SSN |
protected static String |
MASK_SSN_REGEX |
static String[] |
MASKS |
| Constructor and Description |
|---|
Masker() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMask(String mask) |
void |
clearMasks() |
boolean |
hasMasks() |
String |
mask(String value)
Returns string with '*' replacing any value matching a configured mask.
|
void |
removeMask(String mask) |
public static final String MASK_CREDITCARD
public static final String MASK_SSN
public static final String MASK_IP
public static final String[] MASKS
protected static final String MASK_CC_VISA_REGEX
protected static final String MASK_CC_DISCOVER_REGEX
protected static final String MASK_CC_MASTERCARD_REGEX
protected static final String MASK_CC_AMEX_REGEX
protected static final String MASK_CC_DINERS_REGEX
protected static final String MASK_SSN_REGEX
protected static final String MASK_IPV4_REGEX
public void clearMasks()
public void removeMask(@NonNull
String mask)
public void addMask(@NonNull
String mask)
public String mask(String value)
public boolean hasMasks()
Copyright © 2017 Stackify, LLC. All Rights Reserved.