Documentation ¶
Index ¶
- Variables
- func Argon2ID(password string) (hash string, err error)
- func Argon2IDComparePasswordAndHash(password, hash string) (match bool, err error)
- func CheckPasswordHash(password, hash string) bool
- func HashPassword(password string) (string, error)
- func Validate(password string, PasswordConfirm string) error
- type MismatchError
- type Params
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidHash = errors.New("argon2id: hash is not in the correct format") ErrIncompatibleVariant = errors.New("argon2id: incompatible variant of argon2") ErrIncompatibleVersion = errors.New("argon2id: incompatible version of argon2") )
View Source
var DefaultParams = &Params{
Memory: 64 * 1024,
Iterations: 4,
Parallelism: 4,
SaltLength: 16,
KeyLength: 32,
}
Functions ¶
func CheckPasswordHash ¶
func HashPassword ¶
Types ¶
type MismatchError ¶
type MismatchError struct {
// contains filtered or unexported fields
}
func (MismatchError) Error ¶
func (m MismatchError) Error() string
type Params ¶
type ValidationError ¶
func (*ValidationError) Error ¶
func (ve *ValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.