hasher

package
v0.0.0-...-c380036 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(hash string, password string) bool

CheckPasswordHash compares a bcrypt hashed password with its possible plaintext equivalent. Returns nil on success, or an error on failure.

func HashPassword

func HashPassword(password string) (string, error)

HashPassword returns bcrypt hash of the password or error if password hash goes wrong. Use CheckPasswordHash, as defined in this package, to compare the returned hashed password with its cleartext version.

Types

This section is empty.

Jump to

Keyboard shortcuts

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