hash

package
v0.1.30 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Argon2idDefault = Argon2id{
		KeyLength:   64,
		SaltLength:  20,
		Time:        8,
		Memory:      32 * 1024,
		Parallelism: 4,
	}

	ErrInvalidHash         = fmt.Errorf("the encoded hash is not in the correct format")
	ErrIncompatibleVersion = fmt.Errorf("incompatible version of argon2")
)
View Source
var RandRead = rand.Read

Functions

This section is empty.

Types

type Argon2id

type Argon2id struct {
	KeyLength   uint32
	SaltLength  uint32
	Time        uint32
	Memory      uint32
	Parallelism uint8
}

func (*Argon2id) Hash

func (h *Argon2id) Hash(data []byte) (encodedHash string)

func (*Argon2id) Match

func (h *Argon2id) Match(encodedHash string, data []byte) (matched bool, err error)

Jump to

Keyboard shortcuts

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