Documentation
¶
Index ¶
- func GenerateSalt(length int) ([]byte, error)
- func GenerateSaltString(length int) (string, error)
- func HMAC256(b []byte, key []byte) []byte
- func HMAC256String(s string, key string) string
- func MD5(b []byte) []byte
- func MD5String(s string) string
- func SHA1(b []byte) []byte
- func SHA1String(s string) string
- func SHA256(b []byte) []byte
- func SHA256String(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSalt ¶
GenerateSalt generates a random salt with the specified length
func GenerateSaltString ¶ added in v0.0.22
func HMAC256String ¶
HMAC256String calculates HMAC-SHA256 hash and returns hex string
func SHA1String ¶
SHA1String calculates SHA1 hash and returns hex string
func SHA256String ¶
SHA256String calculates SHA256 hash and returns hex string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.