密码脱敏

This commit is contained in:
zhangdeman committed 2023-05-24 15:04:53 +08:00
1 parent 984657032d
commit 04c0d29300
2 files changed
+26

No files matched your search

+2
View File
@@ -14,4 +14,6 @@ const (
TypeMail = "MAIL_DATA_MASK" TypeMail = "MAIL_DATA_MASK"
// TypePhone 手机号脱敏 // TypePhone 手机号脱敏
TypePhone = "PHONE_DATA_MASK" TypePhone = "PHONE_DATA_MASK"
// TypePassword 密码数据脱敏
TypePassword = "PASSWORD_DATA_MASK"
) )
+24
View File
@@ -0,0 +1,24 @@
// Package data_mask ...
//
// Description : data_mask ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 2023-05-24 15:02
package data_mask
// PasswordDataMask 密码数据脱敏
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 15:04 2023/5/24
type PasswordDataMask struct {
}
func (p PasswordDataMask) Mask(input string) string {
return "********"
}
func (p PasswordDataMask) Type() string {
return TypePassword
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.