bcrypt_encryptor

package
v0.0.0-...-e3dc235 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BcryptEncryptor

type BcryptEncryptor struct {
	Config *Config
}

BcryptEncryptor BcryptEncryptor struct

func New

func New(config *Config) *BcryptEncryptor

New initalize BcryptEncryptor

func (*BcryptEncryptor) Compare

func (bcryptEncryptor *BcryptEncryptor) Compare(hashedPassword string, password string) error

Compare check hashed password

func (*BcryptEncryptor) Digest

func (bcryptEncryptor *BcryptEncryptor) Digest(password string) (string, error)

Digest generate encrypted password

type Config

type Config struct {
	Cost int
}

Config BcryptEncryptor config

Jump to

Keyboard shortcuts

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