Versions in this module Expand all Collapse all v1 v1.0.0 Sep 22, 2024 Changes in this version + const HostNameMaxLength + const ITERATION_MULTIPLIER + const MIXCHARS + const SALT_LENGTH + const UserNameMaxLength + func CheckHashingPassword(pwhash []byte, password string, hash string) (bool, error) + func CheckScrambledPassword(salt, hpwd, auth []byte) bool + func DecodePassword(pwd string) ([]byte, error) + func EncodePassword(pwd string) string + func EncodePasswordBytes(pwd []byte) string + func NewHashPassword(pwd string, hash string) string + func NewSM3() hash.Hash + func Sha1Hash(bs []byte) []byte + func Sha256Hash(input []byte) []byte + func Sm3Hash(data []byte) []byte + type RoleIdentity struct + Hostname string + Username string + func (role *RoleIdentity) Restore(ctx *format.RestoreCtx) error + func (role *RoleIdentity) String() string + type UserIdentity struct + AuthHostname string + AuthPlugin string + AuthUsername string + CurrentUser bool + Hostname string + Username string + func (user *UserIdentity) LoginString() string + func (user *UserIdentity) Restore(ctx *format.RestoreCtx) error + func (user *UserIdentity) String() string