hashpassword

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeriveKey

func DeriveKey(p Parameter, data, salt []byte) []byte

func Encode

func Encode(p Parameter, hashed, salt []byte) string

func GenerateRandomBytes

func GenerateRandomBytes(n uint32) ([]byte, error)

func HashPassword

func HashPassword(p Parameter, password string) (string, error)

func ValidatePassword

func ValidatePassword(password, hashedPassword string) (bool, error)

Types

type Parameter

type Parameter struct {
	Memory      uint32
	Iterations  uint32
	Parallelism uint8
	SaltLength  uint32
	KeyLength   uint32
}

func Defaultarameter

func Defaultarameter() Parameter

Jump to

Keyboard shortcuts

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