lxCrypt

package
v1.7.0 Latest Latest
Warning

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

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

type Crypt struct{}

Crypt, type for bcrypt mapper

func NewCrypt

func NewCrypt() *Crypt

return crypt instance

func (*Crypt) ComparePassword

func (c *Crypt) ComparePassword(plainPwd, hashedPwd string) error

ComparePassword, mapper for compare encrypt password with plain password

func (*Crypt) GeneratePassword

func (c *Crypt) GeneratePassword(plainPwd string) (string, error)

GeneratePassword, mapper for create new encrypt password from plain password

type ICrypt

type ICrypt interface {
	GeneratePassword(plainPwd string) (string, error)
	ComparePassword(plainPwd, hashedPwd string) error
}

ICrypt, interface for mapping bcrypt

Directories

Path Synopsis
Package lxCryptMocks is a generated GoMock package.
Package lxCryptMocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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