password

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultCost is the default cost for bcrypt
	DefaultCost = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Password

type Password interface {
	// Hash returns a hashed password
	Hash(pwd string) (string, error)
	// Verify compares a password with a hashed password
	Verify(pwd, hash string) bool
}

Password is an interface for password hashing nolint: revive

func New

func New(costs ...int) Password

New returns a new password instance

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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