密码脱敏
This commit is contained in:
parent
984657032d
commit
04c0d29300
@ -14,4 +14,6 @@ const (
|
||||
TypeMail = "MAIL_DATA_MASK"
|
||||
// TypePhone 手机号脱敏
|
||||
TypePhone = "PHONE_DATA_MASK"
|
||||
// TypePassword 密码数据脱敏
|
||||
TypePassword = "PASSWORD_DATA_MASK"
|
||||
)
|
||||
|
24
password.go
Normal file
24
password.go
Normal 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
|
||||
}
|
Loading…
Reference in New Issue
Block a user