scrypt

package
v0.0.0-...-77f0fe2 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrHashTooShort              = errors.New("hashedSecret too short to be a scrypted password")
	ErrMismatchedHashAndPassword = errors.New("hashedPassword is not the hash of the given password")
)

Functions

func CompareHashAndPassword

func CompareHashAndPassword(hashedPassword, password []byte) error

func DecodeSaltAndHash

func DecodeSaltAndHash(encodedHash []byte) (salt []byte, hash []byte, err error)

func GenerateFromPassword

func GenerateFromPassword(password []byte) (encodedHash string, err error)

func Hash

func Hash(password []byte) (salt []byte, hash []byte, err error)

func HashWithSalt

func HashWithSalt(salt, password []byte) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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