bcrypt

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2025 License: GPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bcrypt

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

func NewBcrypt

func NewBcrypt(salt string) *Bcrypt

func (*Bcrypt) ComparePassword

func (b *Bcrypt) ComparePassword(password, hashedPassword string) error

ComparePassword compares the given password with the hashed password

func (*Bcrypt) HashPassword

func (b *Bcrypt) HashPassword(password string) (string, error)

HashPassword hashes the given password with a custom salt

Jump to

Keyboard shortcuts

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