pwhash

package module
v0.0.0-...-5b43ed9 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2018 License: GPL-3.0 Imports: 10 Imported by: 1

README

pwhash

Simple (probably not secure) password hashing library

Documentation

Index

Constants

View Source
const (

	/* Maximum salt string length. */
	SALT_LEN_MAX = 16
	/* Default number of rounds if not explicitly specified. */
	ROUNDS_DEFAULT = 5000
	/* Minimum number of rounds. */
	ROUNDS_MIN = 1000
	/* Maximum number of rounds. */
	ROUNDS_MAX = 999999999
)

Variables

View Source
var (
	ErrNoSalt      = errors.New("no salt given form")
	ErrInvalidSalt = errors.New("invalid salt")
)

Functions

func Verify

func Verify(password string, hashWithSalt string) (bool, error)

Verify if given password match hash for now only md5, sha256 crypt is supported __`${id}$`__*`{salt}`*__$__*`{checksum}`*

Types

This section is empty.

Jump to

Keyboard shortcuts

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