pwds

package
v2.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package pwds implements functionality for creating a secure hash of a password and for verifying a password matches a stored hash.

Index

Constants

View Source
const MinLength = 10

MinLength is the shortest password we allow.

Variables

View Source
var ErrBadPassword = errors.New("bad password")

ErrBadPassword is used when an invalid password is given. This is used so we don't send back the bcrypt error message.

Functions

func Create

func Create(password string) (string, error)

Create gets a hash from a plaintext password.

func IsValid

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

IsValid validates a cleartext password against its possible hash.

Types

This section is empty.

Jump to

Keyboard shortcuts

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