passhash

package
v0.0.0-...-9ca37e5 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PasswordHasher

type PasswordHasher interface {
	// Hash salts and hashes the given password returning the resulting hash
	Hash(password string) (string, error)

	// Compare returns true if the given password corresponds to
	// the given hash, otherwise returns false
	Compare(password, hash string) bool
}

PasswordHasher defines the interface of a password hasher

func NewBcryptPasswordHasher

func NewBcryptPasswordHasher() PasswordHasher

NewBcryptPasswordHasher creates a new bcrypt based password hasher instance

Jump to

Keyboard shortcuts

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