Documentation
¶
Index ¶
- func CheckPassword(rawPwd, encodedPwd string) bool
- func Encode(rawPwd string, options *Options) (string, string)
- func MakePassword(rawPwd string) string
- func SSLCreate()
- func Verify(rawPwd string, salt string, encodedPwd string, options *Options) bool
- type Options
- type ZdpPassword
- type ZdpPasswordConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPassword ¶
CheckPassword 默认的密码校验方式 @param rawPwd 原始密码 @param encodedPwd 加密后的密码
func Encode ¶
Encode 对密码按照指定配置进行加密。如果参数2是nil,则使用默认的配置。返回加密后的字符串。 @param rawPwd 要加密的密码 @param options 加密配置
func MakePassword ¶
MakePassword 默认的密码加密方式,返回加密的密码 @param rawPwd 要加密的密码
Types ¶
type ZdpPassword ¶
type ZdpPassword struct {
// contains filtered or unexported fields
}
密码加密核心对象
func (*ZdpPassword) Check ¶
func (p *ZdpPassword) Check(userPassword, dataPassword string) bool
Check 检查密码是否正确 @param userPassword 用户输入的密码 @param dataPassword 数据库中加密的密码
func (*ZdpPassword) Make ¶
func (p *ZdpPassword) Make(password string) string
Make 密码加密 @param password 用户要加密的密码
func (*ZdpPassword) Md5 ¶
func (p *ZdpPassword) Md5(content string) string
Md5 生成md5加密字符串 @param content 要加密的内容
type ZdpPasswordConfig ¶
配置对象
Click to show internal directories.
Click to hide internal directories.