authentication

package
v0.0.0-...-4635459 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPassword

func CheckPassword(hashedPw string, password string) bool

CheckPassword accepts a salt/hash and a plaintext password. If that password is a match to the given salt/hash, returns true. Otherwise, returns false.

func EncryptPassword

func EncryptPassword(password string) (string, error)

EncryptPassword generates a bcrypt salt/hash combination from the given password, then returns that salt/hash as a string. If an error occurs, the returned salt/hash is empty string "", and a non-nil error is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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