Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultDesenser = NewDefaultDesenser() ShortDesenser = NewShortDesenser() )
Functions ¶
Types ¶
type StdDesenser ¶
type StdDesenser struct { // 保留前缀字符的长度 MaintainPrefixCharLength int // 保留后缀字符的长度 MaintainSubfixCharLength int }
脱敏器
func NewDefaultDesenser ¶
func NewDefaultDesenser() *StdDesenser
func NewShortDesenser ¶
func NewShortDesenser() *StdDesenser
func NewStdDesenser ¶
func NewStdDesenser(prefix, subfix int) *StdDesenser
func (*StdDesenser) DeSense ¶
func (d *StdDesenser) DeSense(value string) string
func (*StdDesenser) MaintainPrefixString ¶
func (d *StdDesenser) MaintainPrefixString(value string) string
func (*StdDesenser) MaintainSubfixString ¶
func (d *StdDesenser) MaintainSubfixString(value string) string
func (*StdDesenser) SenseCharNumber ¶
func (d *StdDesenser) SenseCharNumber(value string) int
func (*StdDesenser) TotalMaintainCharLen ¶
func (d *StdDesenser) TotalMaintainCharLen() int
Click to show internal directories.
Click to hide internal directories.