Documentation ¶ Index ¶ Variables type Argon2 func NewHasherArgon2(dx argon2Dependencies) *Argon2 func (h *Argon2) Compare(ctx context.Context, password []byte, hash []byte) error func (h *Argon2) Generate(ctx context.Context, password []byte) ([]byte, error) type Hasher type Provider Constants ¶ This section is empty. Variables ¶ View Source var ( ErrInvalidHash = errors.New("the encoded hash is not in the correct format") ErrIncompatibleVersion = errors.New("incompatible version of argon2") ErrMismatchedHashAndPassword = errors.New("passwords do not match") ) Functions ¶ This section is empty. Types ¶ type Argon2 ¶ type Argon2 struct { // contains filtered or unexported fields } func NewHasherArgon2 ¶ func NewHasherArgon2(dx argon2Dependencies) *Argon2 func (*Argon2) Compare ¶ func (h *Argon2) Compare(ctx context.Context, password []byte, hash []byte) error func (*Argon2) Generate ¶ func (h *Argon2) Generate(ctx context.Context, password []byte) ([]byte, error) type Hasher ¶ type Hasher interface { Compare(ctx context.Context, password []byte, hash []byte) error Generate(ctx context.Context, password []byte) ([]byte, error) } type Provider ¶ type Provider interface { Hasher() Hasher } Source Files ¶ View all Source files hasher.go hasher_argon2.go Click to show internal directories. Click to hide internal directories.