Documentation
¶
Index ¶
Constants ¶
View Source
const ( AlgorithmHMACSHA512 pbkdf2HashAlgorithm = iota AlgorithmHMACSHA256 AlgorithmHMACSHA1 )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Hasher ¶
type Hasher interface {
Verify(hash, password string) (result PasswordVerificationResult, err error)
Hash(password string) (hash string, err error)
}
func NewArgon2id ¶
func NewArgon2id() Hasher
func NewPbkdf2FromAlgo ¶ added in v0.0.2
func NewPbkdf2FromAlgo(algorithm pbkdf2HashAlgorithm) Hasher
type PasswordVerificationResult ¶
type PasswordVerificationResult uint8
const ( PasswordVerificationFailed PasswordVerificationResult = iota PasswordVerificationSuccess PasswordVerificationNeedsRehash )
func (PasswordVerificationResult) String ¶
func (r PasswordVerificationResult) String() string
Click to show internal directories.
Click to hide internal directories.