bcrypt

package
v0.0.0-...-a7567a8 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const MaxCost = bcrypt.MaxCost
View Source
const MinCost = bcrypt.MinCost
View Source
const RecommendedCost = 12

RecommendedCost must be >= 12 See IETF article https://www.ietf.org/archive/id/draft-ietf-kitten-password-storage-07.html#name-bcrypt

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrUnsupportedDBValue

type ErrUnsupportedDBValue struct {
	Value any
}

func (ErrUnsupportedDBValue) Error

func (err ErrUnsupportedDBValue) Error() string

type Hash

type Hash []byte

func NewHash

func NewHash(password string, cost int) (Hash, error)

func (Hash) CompareWithPassword

func (hash Hash) CompareWithPassword(password string) error

func (Hash) Cost

func (hash Hash) Cost() (int, error)

func (Hash) GormDataType

func (Hash) GormDataType() string

func (*Hash) Scan

func (hash *Hash) Scan(value interface{}) error

func (Hash) Value

func (hash Hash) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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