hasher

package module
v2.0.3-0...-ad3c726 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Argon2

type Argon2 struct {
	Config argon2.Config
}

Argon2 implements the Hasher interface by using github.com/lhecker/Argon2.

func (*Argon2) Compare

func (a *Argon2) Compare(hash, data []byte) error

Compare compares data with an Argon2 hash and returns an error if the two do not match.

func (*Argon2) Hash

func (a *Argon2) Hash(data []byte) ([]byte, error)

Hash creates a Argon2 hash from data or returns an error. The salt is automatically generated based on the length of the Salt as specified by Config.SaltLength

Jump to

Keyboard shortcuts

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