hash

package
v0.1.1-0...-4a89cbd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2019 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

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")
)

Functions

This section is empty.

Types

type Argon2ID

type Argon2ID struct {
	// contains filtered or unexported fields
}

Argon2ID implements the Hasher interface. Underneath, it uses the Argon2ID implementation to hash passwords and compare passwords.

func NewArgon2ID

func NewArgon2ID(memory, iterations uint32, parallelism uint8, saltLength, keyLength uint32) *Argon2ID

func (*Argon2ID) ComparePasswordAndHash

func (a *Argon2ID) ComparePasswordAndHash(password, encodedHash string) (match bool, err error)

func (*Argon2ID) HashPassword

func (a *Argon2ID) HashPassword(password string) (encodedHash string, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL