pass

package
v0.0.0-...-ff5c026 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

package pass provides password generation and verification using argon2id encoded passwords are stored in the format of: $<ARGON_ALGO (i'm using argon2id)>$<version>:$MEM,ITER,PAR:$<SALT>:$<KEY>

Index

Constants

View Source
const (
	MEM     = 64 * 1024
	ITER    = 1
	PAR     = 2
	SLENGTH = 16
	KLENGTH = 32
)

Hashing Parameter TODO: Parameterize this

Variables

View Source
var (
	ErrWrongHash           = errors.New("error: incorrect hash format")
	ErrIncompatibleVersion = errors.New("error: incompatible version of argon algorithm")
)

Functions

func GenHash

func GenHash(password string) (hash string, err error)

func VerifyHash

func VerifyHash(password, hash string) (match bool, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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