Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmptyPassword = errors.New("empty passowrd") ErrNotYetEncrypted = errors.New("not yet encrypted") ErrMismatched = errors.New("mismatched password") )
View Source
var BeforeEncrypt = func(plain, salt []byte) ([]byte, error) { return append(plain, salt...), nil }
BeforeEncrypt is called before encryption and concats plain passwords and salt
View Source
var HashCost = 12
HashCost is cost of generating password hash
Functions ¶
This section is empty.
Types ¶
type Password ¶
type Password struct {
// contains filtered or unexported fields
}
Password
func NewPassword ¶
NewPassword returns Password
Click to show internal directories.
Click to hide internal directories.