Documentation ¶
Index ¶
- func EncodeHmac(secret, value string, params ...func() hash.Hash) string
- func EncodeMd5(str string) string
- func EncodePassword(rawPwd string, salt string) string
- func GetRandomNumString(n int) string
- func GetRandomString(n int) string
- func PBKDF2(password, salt []byte, iter, keyLen int, h func() hash.Hash) []byte
- func PasswordBcrypt(password string) string
- func VerifyPassword(hashedPassword string, password string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodePassword ¶
use pbkdf2 encode password
func GetRandomNumString ¶
GetRandomNumString Random generate string only Number
func PasswordBcrypt ¶
Hashing the password with the default cost of 10 Return bcrypt password
func VerifyPassword ¶
VerifyPassword compare raw password and encoded password Comparing the password with the hash
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.