Documentation ¶
Index ¶
- func Authenticate(attemptedPassword, encryptedPassword, salt string) bool
- func Decrypt(cryptic, key []byte) ([]byte, error)
- func Encrypt(origData, key []byte) ([]byte, error)
- func EncryptedPassword(rawPwd string, salt string) string
- func GenerateSalt() string
- func MD5(origData string) string
- func PBKDF2(password, salt []byte, iter, keyLen int, h func() hash.Hash) []byte
- func PKCS5Padding(cipher []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func SHA1(data []byte) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authenticate ¶
Authenticate 对输入的密码进行验证
@param attemptedPassword 待验证的密码 @param encryptedPassword 密文 @param salt 盐值 @return 是否验证成功
func PKCS5Padding ¶
func PKCS5UnPadding ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.