crypt

package
v0.0.0-...-5bb3154 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CryptFactory

func CryptFactory(dp dependency.Provider) (interface{}, error)

NewCrypt create a encrypting instance

func RegisterDependencies

func RegisterDependencies(dp dependency.Provider) error

RegisterDependencies is init callback to register module dependencies

Types

type Crypt

type Crypt struct{}

Crypt is global encrypting provider

func (*Crypt) Compare

func (c *Crypt) Compare(hashedPass, pass string) (bool, error)

Compare take pass and hashedPass and return boolean if it's match or not

func (*Crypt) Hash

func (c *Crypt) Hash(pass string) (string, error)

Hash take input string (f.e. password) and return bcrypted string

Jump to

Keyboard shortcuts

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