Documentation ¶
Index ¶
- func EncodePassword(rawPwd string, salt string) string
- func EncryptPasswordForDB(password string, passwordSaltLength int) string
- func GetRandomQrCodeSecurityToken(n int) string
- func GetRandomString(n int) string
- func GetUserPasswordSalt(passwordSaltLength int) string
- func PBKDF2(password, salt []byte, iter, keyLen int, h func() hash.Hash) []byte
- func VerifyPassword(rawPwd, encodedPwd string, passwordSaltLength int) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodePassword ¶
use pbkdf2 encode password
func EncryptPasswordForDB ¶
func GetRandomQrCodeSecurityToken ¶
Random generate string
func GetRandomString ¶
func GetUserPasswordSalt ¶
return a user salt token
func PBKDF2 ¶
This code was copied from: http://code.google.com/p/go/source/browse/pbkdf2/pbkdf2.go?repo=crypto
func VerifyPassword ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.