Documentation
¶
Index ¶
Constants ¶
View Source
const ( Identifier = "2" Prefix = "$" + Identifier )
Identifier and prefix used by Bcrypt
View Source
const ( DefaultMinCost = bcrypt.MinCost DefaultMaxCost = bcrypt.MaxCost DefaultCost = bcrypt.DefaultCost )
Variables ¶
View Source
var DefaultValidationOpts = ValidationOpts{ MinCost: DefaultMinCost, MaxCost: DefaultMaxCost, }
View Source
var (
Versions = [...]byte{'a', 'b', 'y'}
)
Versions of the Bcrypt implementation.
Functions ¶
This section is empty.
Types ¶
type Hasher ¶
type Hasher struct {
// contains filtered or unexported fields
}
Hasher hashes and verifies bcrypt passwords.
func New ¶
func New(cost int, opts *ValidationOpts) *Hasher
New will return a Hasher with cost as bcrypt parameter.
type ValidationOpts ¶ added in v0.12.0
type Verifier ¶
type Verifier struct {
// contains filtered or unexported fields
}
func NewVerifier ¶ added in v0.12.0
func NewVerifier(opts *ValidationOpts) *Verifier
Click to show internal directories.
Click to hide internal directories.