password

package
v0.0.0-...-110d06e Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash

func Hash(password string) (string, error)

Hash encrypt password using bcrypt. Remember that each call will generate different hash even if the password is the same.

func IsMatch

func IsMatch(password, hash string) bool

IsMatch returns true if password equals to hash, false otherwise. Input password is commonly from user's input, while the hash should be from database record.

Types

This section is empty.

Jump to

Keyboard shortcuts

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