hash

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultTime    = uint32(4)
	DefaultMemory  = uint32(64 * 1024)
	DefaultThreads = uint8(1)
)
View Source
var (
	ErrInvalidHash         = errors.New(`the encoded hash is not in the correct format`)
	ErrIncompatibleVersion = errors.New(`incompatible version of argon2`)
)

Functions

func Make

func Make(password string, option Option) (hashedPassword string, err error)

func Verify

func Verify(password string, hashedPassword string) (result bool, err error)

Types

type Option

type Option struct {
	Time    uint32
	Memory  uint32
	Threads uint8
}

Jump to

Keyboard shortcuts

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