Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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. Example: this will give us a 32 byte output token, err = GenerateRandomString(32)
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. Example: this will give us a 44 byte, base64 encoded output token, err := GenerateRandomStringURLSafe(32)
Types ¶
type Password ¶
type Password struct{}
Password is our secret service implementation
func (*Password) HashMatchesPassword ¶
HashMatchesPassword matches hash with password. Returns true if hash and password match.
func (*Password) HashPassword ¶
HashPassword hashes the password using bcrypt
func (*Password) HashRandomPassword ¶
HashRandomPassword creates a random password for passwordless mobile signup