decorator

package
v0.0.5-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: MIT Imports: 6 Imported by: 0

README

Decorator example

Sometimes the generator will need a little help in creating values for functions. An example is given, using a simple Argon2 password manager implementation. In this case we want to provide the generator with pre-defined values for the hash and the password, which is shown in evo.yaml.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PWManager

type PWManager struct {
	Config *PasswordConfig
}

PWManager the password manager containing the config

func DefaultManager

func DefaultManager() *PWManager

DefaultManager default manager

func (*PWManager) ComparePassword

func (m *PWManager) ComparePassword(password, hash string) (bool, error)

ComparePassword compares password with given hash

func (*PWManager) GeneratePassword

func (m *PWManager) GeneratePassword(password string) (string, error)

GeneratePassword generate password hash from string

type PasswordConfig

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

PasswordConfig config for passwords

Jump to

Keyboard shortcuts

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