passwd

package
v0.0.0-...-2e0ef96 Latest Latest
Warning

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

Go to latest
Published: May 10, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PasswdHashAlgoBCrypt = "bcrypt"
	PasswdHashAlgoSHA512 = "sha512"
)

Variables

This section is empty.

Functions

func CalcHash

func CalcHash(password string, algo string) (string, error)

func CheckDifficulty

func CheckDifficulty(password string, diffOpt *DifficultyOpt) error

func CompareHash

func CompareHash(password string, hash string, algo string) bool

Types

type DifficultyOpt

type DifficultyOpt struct {
	MinLength          int
	DiffCase           bool
	Numbers            bool
	Specials           bool
	MaxIdentSymPercent int
	ForbidSequences    int
}

Jump to

Keyboard shortcuts

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