password

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT-0 Imports: 7 Imported by: 0

Documentation

Overview

Package password hashes and verifies account passwords with Argon2id.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidHash = errors.New("password: invalid argon2id hash")

ErrInvalidHash reports a password hash that is not in the PHC Argon2id format this package produces.

Functions

func Hash

func Hash(password string) (string, error)

Hash returns a PHC-formatted Argon2id hash of password.

func Verify

func Verify(hash, password string) (bool, error)

Verify reports whether password matches hash. It returns false without an error for a well-formed hash that does not match.

Types

This section is empty.

Jump to

Keyboard shortcuts

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