password2h

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Unlicense Imports: 5 Imported by: 0

README

password2h

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Argon2idHash

type Argon2idHash struct {
	// contains filtered or unexported fields
}

func NewArgon2idHash

func NewArgon2idHash(time, saltLen uint32, memory uint32, threads uint8, keyLen uint32) *Argon2idHash

NewArgon2idHash constructor function for Argon2idHash.

func NewArgon2idHashDefault

func NewArgon2idHashDefault() *Argon2idHash

NewArgon2idHashDefault constructor function for Argon2idHash.

func (*Argon2idHash) CompareHashAndPassword

func (a *Argon2idHash) CompareHashAndPassword(encodedHash, password string) bool

CompareHashAndPassword return true if hash is equal to password

func (*Argon2idHash) HashPassword

func (a *Argon2idHash) HashPassword(password string) *HashSalt

HashPassword create hash from password

func (*Argon2idHash) UnwrapPassword

func (a *Argon2idHash) UnwrapPassword(encodedData string) (*HashSalt, error)

UnwrapPassword unwrap password and salt into object

func (*Argon2idHash) WrapPassword

func (a *Argon2idHash) WrapPassword(data *HashSalt) string

WrapPassword wrap password and salt from object

type HashSalt

type HashSalt struct {
	Hash, Salt []byte
}

Jump to

Keyboard shortcuts

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