bcrypts

package
v0.0.0-...-b7287e2 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: Apache-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 Config

type Config struct {
	Cost int
}

Config BcryptEncryptor config

type Encryptor

type Encryptor struct {
	Config *Config
}

Encryptor BcryptEncryptor struct

func New

func New(config *Config) *Encryptor

New initalize BcryptEncryptor

func (*Encryptor) Compare

func (bcryptEncryptor *Encryptor) Compare(raw string, enc string) error

Compare check hashed password

func (*Encryptor) Digest

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

Digest generate encrypted password

Jump to

Keyboard shortcuts

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