argon

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidHash         = errors.New("the encoded hash is not in the correct format")
	ErrIncompatibleVersion = errors.New("incompatible version of argon2")
)

Functions

This section is empty.

Types

type Argon

type Argon struct {
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *Argon

func (*Argon) Hash

func (a *Argon) Hash(password string) (string, error)

func (*Argon) Verify

func (a *Argon) Verify(password string, hash string) (bool, error)

type Option

type Option func(*options)

func WithIterations

func WithIterations(iterations uint32) Option

func WithKeyLength

func WithKeyLength(keyLength uint32) Option

func WithMemory

func WithMemory(memory uint32) Option

func WithParallelism

func WithParallelism(parallelism uint8) Option

func WithSaltLength

func WithSaltLength(saltLength uint32) Option

Jump to

Keyboard shortcuts

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