Documentation
¶
Index ¶
- Constants
- func BcryptHash(text string) (string, error)
- func BcryptHashWithCost(text string, cost int) (string, error)
- func BcryptVerify(hash string, text string) bool
- func HmacSha256(text string, key string) string
- func HmacSha512(text string, key string) string
- func HmacVerifySha256(text string, key string, signature string) bool
- func HmacVerifySha512(text string, key string, signature string) bool
- func RandomHex(length int) string
- func Sha1(text string) string
- func Sha3Variant256(text string) string
- func Sha3Variant512(text string) string
- func Sha256(text string) string
Constants ¶
View Source
const HexTable = "0123456789abcdef"
Variables ¶
This section is empty.
Functions ¶
func BcryptHash ¶
BcryptHash returns the bcrypt hash of the password with a default cost of 10.
func BcryptHashWithCost ¶
BcryptHashWithCost returns the bcrypt hash of the password at the given cost.
func BcryptVerify ¶
BcryptVerify verifies that a bcrypt hash matches the given text.
func HmacSha256 ¶
HmacSha256 computes hmac hash using sha256 checksum.
func HmacSha512 ¶
HmacSha512 computes hmac hash using sha512 checksum.
func HmacVerifySha256 ¶
HmacVerifySha256 verifies hmac hash using sha256 checksum.
func HmacVerifySha512 ¶
HmacVerifySha512 verifies hmac hash using sha512 checksum.
func Sha3Variant256 ¶
Sha3Variant256 returns the sha3-256 digest of the text.
func Sha3Variant512 ¶
Sha3Variant512 returns the sha3-512 digest of the text.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.