passhash

package
v0.0.0-...-4790e63 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package passhash provides password hashing functionality using bcrypt.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Passhash

type Passhash struct{}

Passhash is a password hashing tool.

func New

func New() *Passhash

New returns a password hashing tool.

func (*Passhash) Hash

func (p *Passhash) Hash(password string) (string, error)

Hash returns a hashed string and an error.

func (*Passhash) HashBytes

func (p *Passhash) HashBytes(password []byte) ([]byte, error)

HashBytes returns a hashed byte array and an error.

func (*Passhash) Match

func (p *Passhash) Match(hash, password string) bool

Match returns true if the hash matches the password.

func (*Passhash) MatchBytes

func (p *Passhash) MatchBytes(hash, password []byte) bool

MatchBytes returns true if the hash matches the password.

Jump to

Keyboard shortcuts

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