argon2

package
v0.0.0-...-53df4c2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package argon2 provides an easy way to use the argon2 key derivation function.

Index

Constants

This section is empty.

Variables

View Source
var (
	Memory      uint32 = 65536
	Iterations  uint32 = 3
	Parallelism uint8  = 2
	SaltLength  uint32 = 16
	KeyLength   uint32 = 32
)
View Source
var (
	// ErrIncompatibleVersion is an incompatible version error.
	ErrIncompatibleVersion = errors.New("argon2: incompatible version")

	// ErrInvalidHash is an invalid hash error.
	ErrInvalidHash = errors.New("argon2: invalid hash")

	// ErrFailedVerify is a failed verification error.
	ErrFailedVerify = errors.New("argon2: failed verify")
)

Functions

func Hash

func Hash(input []byte) (string, error)

Hash hashes the input using the argon2id algorithm.

func Verify

func Verify(input []byte, encodedHash string) error

Verify verifies the input against a hash.

Types

This section is empty.

Jump to

Keyboard shortcuts

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