password

package module
v0.0.0-...-673f6ff Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2019 License: MIT Imports: 6 Imported by: 1

README

password

Build Status Go Report Card GoDoc GitHub license

This library produces random, irreversible Hash storage passwords Can only be used to verify that the password is correct

License

Pouch is licensed under the MIT License. See LICENSE for the full license text.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encrypt

func Encrypt(word string) (code string)

Encrypt encryption adds random variables to make each encryption different

func Verify

func Verify(word, code string) bool

Verify password

Types

type Password

type Password struct {
	NewHash        func() hash.Hash
	RandReader     io.Reader
	HashSize       int
	RandSize       int
	EncodeToString func([]byte) string
	DecodeString   func(string) ([]byte, error)
}

Password Lossy encryption used to store and verify passwords

func (*Password) Encrypt

func (p *Password) Encrypt(word string) (code string)

Encrypt encryption adds random variables to make each encryption different

func (*Password) Verify

func (p *Password) Verify(word, code string) bool

Verify password

Jump to

Keyboard shortcuts

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