password

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ILogger

type ILogger interface {
	Error(args ...interface{})
}

ILogger logger

type Password

type Password struct {
	Config struct {
		Token string `mapstructure:"token"`
		Cost  int    `mapstructure:"cost"`
	}
	// contains filtered or unexported fields
}

Password password

func (Password) Hash

func (pwd Password) Hash(token, password string) string

Hash password hash

func (Password) Instance

func (pwd Password) Instance() Password

Instance get password operation object

func (Password) OnChange

func (pwd Password) OnChange(viper *viper.Viper)

OnChange ...

func (Password) Verify

func (pwd Password) Verify(token, password, hash string) bool

Verify password hash verify

Jump to

Keyboard shortcuts

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