gophpass

package module
v0.0.0-...-4e06743 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2020 License: MIT Imports: 8 Imported by: 0

README

gophpass

Documentation

Index

Constants

View Source
const (
	StdPadding rune = '=' // Standard padding character
	NoPadding  rune = -1  // No padding
)
View Source
const (
	MinHashCount     = 7
	MaxHashCount     = 30
	DefaultHashCount = 15
	HashLength       = 55
	SaltLength       = 6
	ITOA64           = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
)

constants

Variables

View Source
var InvalidCountError = errors.New("Invalid Count")

InvalidCountError errors

View Source
var InvalidSaltError = errors.New("Invalid Salt")

Functions

func Check

func Check(password string, hash string) bool

Check password hash with stored hash

func HashedPassword

func HashedPassword(password string, cLog2 uint) (string, error)

HashedPassword is wrapper for hashPassword

Types

type MyEncoding

type MyEncoding struct {
	base64.Encoding // extend base64.Encoding because
	// contains filtered or unexported fields
}

MyEncoding is Alias/Composition of struct Encoding

func MyNewEncoding

func MyNewEncoding(encoder string) *MyEncoding

MyNewEncoding overrides base64.Encoding.NewEncoding()

func (*MyEncoding) MyEncode

func (enc *MyEncoding) MyEncode(dst, src []byte)

MyEncode is overridden methode base64.Encoding.Encode() (polymorphism) MyEncoding is a Composition class of Encoding

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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