passhash

package
v0.0.0-...-44af80e Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2018 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) HashBytes

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

HashBytes returns a hashed byte array and an error.

func (*Passhash) HashString

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

HashString returns a hashed string and an error.

func (*Passhash) MatchBytes

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

MatchBytes returns true if the hash matches the password.

func (*Passhash) MatchString

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

MatchString 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