Package cn.mindit.atom.core.util
Enum Class MaskType
- All Implemented Interfaces:
Serializable,Comparable<MaskType>,Constable
- Since:
- 2023-08-25
- Author:
- Catch
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription地址, 只显示到地区,不显示详细地址,比如:北京市海淀区****银行卡号, 只显示后4位, 如:**** **** **** 3728车牌中间用*代替自定义, 自定义 [start, end) 字符为 *邮箱, 前缀仅显示第一个字母,前缀其他隐藏,用星号代替,@及后面的地址显示,比如:d**@126.com座机号, 只显示前4位和后2位,如 0379*****12ID, 不对外提供id, 统一都为 0身份证号, 只显示前3位和后4位,如 410***********1234IPv4 ,如:脱敏前:192.168.1.1;脱敏后:192IPv6,如:脱敏前:2001:0db8:86a3:08d3:1319:8a2e:0370:7344;脱敏后:2001:*:*:*:*:*:*:*姓名, 只显示第1位,如 李*, 王**密码, 全部字符都用*代替,比如:******手机号, 只显示手机号前3位和后4位,如 138****1234 -
Method Summary
-
Enum Constant Details
-
CUSTOM
自定义, 自定义 [start, end) 字符为 * -
NAME
姓名, 只显示第1位,如 李*, 王** -
PHONE
手机号, 只显示手机号前3位和后4位,如 138****1234 -
ID_CARD
身份证号, 只显示前3位和后4位,如 410***********1234 -
BANK_CARD
银行卡号, 只显示后4位, 如:**** **** **** 3728 -
EMAIL
邮箱, 前缀仅显示第一个字母,前缀其他隐藏,用星号代替,@及后面的地址显示,比如:d**@126.com -
PASSWORD
密码, 全部字符都用*代替,比如:****** -
FIXED_PHONE
座机号, 只显示前4位和后2位,如 0379*****12 -
ADDRESS
地址, 只显示到地区,不显示详细地址,比如:北京市海淀区**** -
ID
ID, 不对外提供id, 统一都为 0 -
CAR_LICENSE
车牌中间用*代替eg1:null -》 ""
eg2:"" -》 ""
eg3:苏D40000 -》 苏D4***0
eg4:陕A12345D -》 陕A1****D
eg5:京A123 -》 京A123 如果是错误的车牌,不处理
-
IPV4
IPv4 ,如:脱敏前:192.168.1.1;脱敏后:192.*.*.* -
IPV6
IPv6,如:脱敏前:2001:0db8:86a3:08d3:1319:8a2e:0370:7344;脱敏后:2001:*:*:*:*:*:*:*
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-