desensitizedutil

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Address

func Address(address string) string

Address 脱敏地址 中文地址保留前2个字符,英文地址保留前4个字符,处理短地址和标准地址

func BankCard

func BankCard(cardNumber string) string

BankCard 脱敏银行卡号,保留前四位和最后四位

func Email

func Email(email string) string

Email 脱敏电子邮件,保留首字母和@之后的域名

func Hide

func Hide(str string, start, end int) string

Hide 根据指定的起始和结束位置隐藏字符串中的部分字符,处理 Unicode 字符

func IdCardNum

func IdCardNum(idCard string) string

IdCardNum 脱敏身份证号码,保留首位和最后两位

func MobilePhone

func MobilePhone(mobile string) string

MobilePhone 脱敏手机号,保留前三位和最后四位

func Password

func Password(password string) string

Password 脱敏密码,隐藏全部字符

func PlateNumber

func PlateNumber(plate string) string

PlateNumber 脱敏车牌号,处理多字节字符

func UserId

func UserId(userId string) string

UserId 脱敏用户ID,保留首位和最后一位

Types

type DesensitizedUtil

type DesensitizedUtil struct{}

DesensitizedUtil 脱敏工具类

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL