Skip to content
forked from Nepxion/Mask

Nepxion Mask is a mask component collection which are used for finance service domain

License

Notifications You must be signed in to change notification settings

magicgodwin/Mask

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nepxion Mask

Total lines License Build Status Codacy Badge

Nepxion Mask是一款掩码脱敏集成组件(从网上开源搜集,非原创)

请联系我

微信和公众号

Alt text Alt text

简介

支持如下业务场景

  • 手机号码
  • 银行卡号
  • 身份证号
  • 姓名
  • 信用卡 CVV
  • 信用卡有效期
  • 密码
  • 验证码
  • 地址
  • 邮件
  • IP

示例

调用入口

public class MaskTest {
    public static void main(String[] args) throws Exception {
        System.out.println(MaskType.MOBILE.mask("13812345678"));
        System.out.println(MaskType.BANK_CARD.mask("1234 1234 1234 1234 123"));
        System.out.println(MaskType.ID_CARD.mask("331012198001013030"));
        System.out.println(MaskType.NAME.mask("张三丰"));
        System.out.println(MaskType.CVV.mask("123"));
        System.out.println(MaskType.CREDIT_EXP.mask("12/18"));
        System.out.println(MaskType.PASSWORD.mask("12345678"));
        System.out.println(MaskType.CAPTCHA.mask("1234"));
        System.out.println(MaskType.ADDRESS.mask("上海市浦东新区浦建路1000弄2号0501室"));
        System.out.println(MaskType.EMAIL.mask("[email protected]"));
        System.out.println(MaskType.IP_ADDRESS.mask("192.168.0.1"));
    }
}

运行结果

138****5678
1234 1************* 123
33**************30
*三丰
***
****
******
******
上海市浦东新区浦建路***弄***号***室
1***7@qq.com
192.*.*.1

About

Nepxion Mask is a mask component collection which are used for finance service domain

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%