Versions in this module Expand all Collapse all v1 v1.0.3 Sep 23, 2020 Changes in this version + func IsHash(candidate string) bool v1.0.2 Oct 5, 2019 Changes in this version + const DefaultIterations + const DefaultKeyLen + const DefaultMemory + const DefaultSaltLen + const MinimumKeyLen + const MinimumParallelism + const MinimumSaltLen + var DefaultAuthenticator = &Authenticator + var DefaultCtx = Context + var ErrHashAndPassNotMatch = errors.New("Password does not Match the Hash") + var ErrIncompatibleVersion = errors.New("Hash version differs from Go library's implemented version") + var ErrInvalidHash = errors.New("Hash is not a valid argon2 hash") + var ErrKeyLenTooSmall = errors.New("Key length is too small") + var ErrParallelismTooSmall = errors.New("Degree of parallelism is too small") + var ErrSaltLenTooSmall = errors.New("Salt length is too small") + var ErrUnknownAlgorithm = errors.New("Unknown algorithm") + type Algorithm string + const Argon2i + const Argon2id + type Authenticator struct + func NewAuthenticator(ctx *Context) (*Authenticator, error) + func (a *Authenticator) Compare(hash, plaintext string) error + func (a *Authenticator) Hash(plaintext string) (string, error) + type Context struct + Algorithm Algorithm + Iterations uint32 + KeyLen uint32 + Memory uint32 + SaltLen uint32 + Threads uint8 + Version uint8