add 新增脱敏策略

2.X
hemengji 6 months ago
parent 92f213660d
commit 180ddb7106

@ -37,7 +37,52 @@ public enum SensitiveStrategy {
/** /**
* *
*/ */
BANK_CARD(DesensitizedUtil::bankCard); BANK_CARD(DesensitizedUtil::bankCard),
/**
*
*/
CHINESE_NAME(DesensitizedUtil::chineseName),
/**
*
*/
FIXED_PHONE(DesensitizedUtil::fixedPhone),
/**
* ID
*/
user_ID(s -> String.valueOf(DesensitizedUtil.userId())),
/**
* ipv4
*/
IPV4(DesensitizedUtil::ipv4),
/**
* ipv6
*/
IPV6(DesensitizedUtil::ipv6),
/**
*
*/
CAR_LICENSE(DesensitizedUtil::carLicense),
/**
*
*/
FIRST_MASK(DesensitizedUtil::firstMask),
/**
* null
*/
CLEAR(s -> DesensitizedUtil.clear()),
/**
* ""
*/
CLEAR_TO_NULL(s -> DesensitizedUtil.clearToNull());
//可自行添加其他脱敏策略 //可自行添加其他脱敏策略

Loading…
Cancel
Save