Documentation
¶
Overview ¶
Package noble implements a simple wrapper which makes working with argon2 as simple as possible.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Argon ¶
type Argon struct { Time uint32 // the execution time, given in number of iterations. Memory uint32 // the memory usage, given in kibibytes (1024 bytes). Threads uint8 // the number of parallel threads. KeyLen uint32 // the key length; for AES-256, use 32. MinPasswordLength uint32 // specifies a minimum length for the supplied password. Reader Reader // a type that exists simply so we can swap readers for testing. }
Argon is the main type for this module. Creating a variable of this type (typically with the New function) gives access to the two methods GeneratePasswordKey and ComparePasswordAndKey.
func (*Argon) ComparePasswordAndKey ¶
ComparePasswordAndKey compares a plain text password with the supplied key, and returns true if the hash in the key matches the password.
type RandomSourceReader ¶ added in v1.0.1
type RandomSourceReader struct{}
RandomSourceReader is an empty type so that we can swap in a test reader to simulate the situation where we can't generate a salt using crypto/rand.
Click to show internal directories.
Click to hide internal directories.