argon2

package
v0.2.16 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HashID  = "a2id"
	Version = argon2.Version
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Version  int
	Time     uint32
	Mem      uint32
	Parallel uint8
}

Config is argon2id params

func (*Config) String

func (c *Config) String() string

type Hasher

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

Hasher implements h2hash.Hasher for argon2id

func New

func New(hashlen, saltlen int, config Config) *Hasher

New creates a new argon2id hasher

func (*Hasher) Hash

func (h *Hasher) Hash(msg []byte) (string, error)

func (*Hasher) ID

func (h *Hasher) ID() string

func (*Hasher) Verify

func (h *Hasher) Verify(msg []byte, msghash string) (bool, error)

Jump to

Keyboard shortcuts

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