Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var WrongFormatPasswd = errors.New("wrong password format")
View Source
var WrongPasswd = errors.New("wrong password")
Functions ¶
func Encode ¶
Encode takes two arguments, a raw password, and a pointer to an Options struct. In order to use default options, pass `nil` as the second argument. It returns the generated salt and encoded supper_key for the user.
func Verify ¶
Verify takes four arguments, the raw password, its generated salt, the encoded password, and a pointer to the Options struct, and returns a boolean value determining whether the password is the correct one or not. Passing `nil` as the last argument resorts to default options.
func VerifyPasswd ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.