passwordhash

package
v0.0.0-...-86e854f Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatHash

func FormatHash(key, salt []byte) []byte

func GeneratePasswordAndHash

func GeneratePasswordAndHash() (password, hash string, err error)

func HashPassword

func HashPassword(password, salt []byte) []byte

func RandomBytes

func RandomBytes(length int) ([]byte, error)

func Validate

func Validate(password, hash []byte) error

Validate a password hash string. Format: "$<VERSION>$<SALT>$<KEY>" where VERSION = 1, and SALT and KEY are base64 standard-encoded strings.

Types

This section is empty.

Jump to

Keyboard shortcuts

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