Documentation ¶
Index ¶
- Constants
- Variables
- func DecryptPassword(password, salt string) (str string, err error)
- func EncryptPassword(password, salt string) (str string, err error)
- func GeneratePassword(password, salt string) (string, error)
- func GenerateSalt() string
- func ValidatePassword(p1, dePass, salt string) bool
- func ValidatePasswordErr(p1, dePass, salt string) error
Constants ¶
View Source
const ( DefaultKey = key DefaultIv = "1234567890123456" )
Variables ¶
View Source
var ErrValidatePassword = perrors.ErrorInvalidParams("密码错误")
Functions ¶
func DecryptPassword ¶
DecryptPassword 解密密码
func EncryptPassword ¶
EncryptPassword 加密密码
func GeneratePassword ¶
GeneratePassword 生成密码
func ValidatePasswordErr ¶
ValidatePasswordErr 验证密码
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.