password

package
v0.0.0-...-a4b6dd1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HashManager

type HashManager interface {
	Hash(password string) (string, error)
	HashWithSalt(password string) (string, string, error)
	Validate(password string, hash string) (bool, error)
	ValidateWithSalt(password string, salt string, hash string) (bool, error)
}

type HashManagerMock

type HashManagerMock struct {
	mock.Mock
}

func (*HashManagerMock) Hash

func (t *HashManagerMock) Hash(password string) (string, error)

func (*HashManagerMock) HashWithSalt

func (t *HashManagerMock) HashWithSalt(password string) (string, string, error)

func (*HashManagerMock) Validate

func (t *HashManagerMock) Validate(password string, hash string) (bool, error)

func (*HashManagerMock) ValidateWithSalt

func (t *HashManagerMock) ValidateWithSalt(password string, salt string, hash string) (bool, error)

type Hasher

type Hasher struct{}

func NewPasswordHasher

func NewPasswordHasher() *Hasher

func (*Hasher) Hash

func (t *Hasher) Hash(password string) (string, error)

func (*Hasher) HashWithSalt

func (t *Hasher) HashWithSalt(password string) (string, string, error)

func (*Hasher) Validate

func (t *Hasher) Validate(password string, hash string) (bool, error)

func (*Hasher) ValidateWithSalt

func (t *Hasher) ValidateWithSalt(password string, salt string, hash string) (bool, error)

Jump to

Keyboard shortcuts

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