argon2

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2020 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareHashAndPasswordAES256

func CompareHashAndPasswordAES256(encoded string, password []byte) (key []byte, err error)

CompareHashAndPasswordAES256 generates a hash from the password with the same parameters as the hash and then compares the second part of it.

func GenerateFromPasswordAES256

func GenerateFromPasswordAES256(password []byte, p Params) (key []byte, verific string, err error)

GenerateFromPasswordAES256 generates a hash and returns the first part for use as an AES-256 key, the second part for storage and lastly an error.

Types

type Params

type Params struct {
	Salt    []byte
	Time    uint32
	Memory  uint32
	Threads uint8
	KeyLen  uint32
}

Params controls structural values for the argon2 implementation.

Jump to

Keyboard shortcuts

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