Documentation
¶
Index ¶
Constants ¶
View Source
const (
ErrHashesDoesNotMatch = "hashes do not match"
)
Variables ¶
This section is empty.
Functions ¶
func RandomSalt ¶
Types ¶
type Argon2HashOpts ¶
type HashFunction ¶
type HashFunction interface { Hash(salt, text string) (string, error) Verify(salt, hashed, plain string) error }
HashFunction interface for hashing and verifying hashes
func NewArgon2Hasher ¶
func NewArgon2Hasher(opts Argon2HashOpts) HashFunction
func NewBryptHash ¶
func NewBryptHash(cost ...int) HashFunction
Click to show internal directories.
Click to hide internal directories.