Documentation ¶
Index ¶
- func CheckPasswordHash(password, hash string) bool
- func GenerateRandomBytes(n int) ([]byte, error)
- func GenerateRandomString(n int) (string, error)
- func GenerateRandomStringURLSafe(n int) (string, error)
- func HashPassword(password string) (string, error)
- func InArray(val interface{}, array interface{}) (exists bool, index int)
- func IsEmail(s string) bool
- func Sha256(s string) string
- func StrCapRandom(length int) string
- func StrNumRandom(length int) string
- func StrRandom(length int) string
- func StrSlug(s string) string
- func StrSlugRandom(s string) string
- func Truncate(s string, length int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
func GenerateRandomBytes ¶
GenerateRandomBytes returns securely generated random bytes. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue.
func GenerateRandomString ¶
GenerateRandomString returns a securely generated random string. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue.
func GenerateRandomStringURLSafe ¶
GenerateRandomStringURLSafe returns a URL-safe, base64 encoded securely generated random string. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue.
func HashPassword ¶
func StrCapRandom ¶
func StrNumRandom ¶
func StrSlugRandom ¶
Types ¶
This section is empty.