bcrypt

package
v0.0.0-...-dc61bab Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Cost int `mapstructure:"cost"`
}

type Hasher

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

func NewHasherService

func NewHasherService(options ...Option) *Hasher

func (*Hasher) HashPassword

func (h *Hasher) HashPassword(password string) (string, error)

func (*Hasher) VerifyPassword

func (h *Hasher) VerifyPassword(password, hash string) bool

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option configures a Hasher.

func Preset

func Preset(options ...Option) Option

Preset turns a list of Option instances into an Option

func SetConfig

func SetConfig(cfg Config) Option

func SetCost

func SetCost(cost int) Option

Jump to

Keyboard shortcuts

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