Documentation
¶
Index ¶
- func CryptPassword(password string) string
- func DecryptPassword(decryptedPassword, secretKey string) string
- func DynamicSaltAndHashPassword(password string) (string, string)
- func DynamicSaltPassword(password string) (string, string)
- func EncryptPassword(password, secretKey string) string
- func HashPassword(pwd string) string
- func RandomString(n int) string
- func SaltAndHashPassword(password, salt string) string
- func SaltPassword(password, salt string) string
- func StaticSaltAndHashPassword(password string, saltLength int) (string, string)
- func StaticSaltPassword(password string, saltLength int) (string, string)
- func VerifyHash2Hash(hash, hashedPassword string) bool
- func VerifyPassword2Hash(hash, password, salt string) bool
- func VerifySaltedPassword2Hash(hash, saltedPassword string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CryptPassword ¶
func DecryptPassword ¶
func DynamicSaltAndHashPassword ¶
Salt password with a dynamic length salt and hash it and return hash with salt
func DynamicSaltPassword ¶
Salt password with a dynamic length salt and return salted password with salt
func EncryptPassword ¶
func RandomString ¶
RandomString returns a random string with the length of n
func SaltAndHashPassword ¶
Salt password and hash it and return with the value
func SaltPassword ¶
Salt password with the salt and return with the value
func StaticSaltAndHashPassword ¶
Salt password with a fixed length salt and hash it and return hash with salt
func StaticSaltPassword ¶
Salt password with a fixed length salt and return salted password with salt
func VerifyHash2Hash ¶
Verify hashed password with the hash
func VerifyPassword2Hash ¶
Verify password with the hash
func VerifySaltedPassword2Hash ¶
Verify salted password with the hash
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.