password

package
v0.0.0-...-27596e2 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Unimplemented is an unimplemented password hash comparer.
	Unimplemented hashComparer = iota
	// Bcrypt is a bcrypt password hash comparer.
	Bcrypt
)

Variables

View Source
var ErrUnsupported = errors.New("unsupported password hash comparer")

ErrUnsupported is returned when the password hash comparer is not supported.

Functions

This section is empty.

Types

type HashComparer

type HashComparer interface {
	// Compare compares a hashed password with a plain password.
	Compare(hashedPassword, plainPassword string) error

	// Hash hashes a plain password.
	Hash(plainPassword string) (string, error)
}

HashComparer is a password hash comparer.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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