password

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: MIT Imports: 1 Imported by: 0

README

go-password

hash a password and verify password against hash

used packages

getting started

go get github.com/Lukas-Nielsen/go-password
import "github.com/Lukas-Nielsen/go-password"

usage

hash a password
// returns the password hash and error
hash, err := password.Hash(<password>)
verify a password
// returns true or false
isValid := password.Verify(<password>, <hash>)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash

func Hash(password string) (string, error)

creates a new password hash using a strong one-way hashing algorithm

func Verify

func Verify(password string, hash string) bool

Verifies that a password matches a hash

Types

This section is empty.

Jump to

Keyboard shortcuts

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