scoring

package
v2.0.12 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2018 License: MIT, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	START_UPPER string = `^[A-Z][^A-Z]+$`
	END_UPPER   string = `^[^A-Z]+[A-Z]$'`
	ALL_UPPER   string = `^[A-Z]+$`

	//for a hash function like bcrypt/scrypt/PBKDF2, 10ms per guess is a safe lower bound.
	//(usually a guess would take longer -- this assumes fast hardware and a small work factor.)
	//adjust for your site accordingly if you use another hash function, possibly by
	//several orders of magnitude!
	SINGLE_GUESS      float64 = 0.010
	NUM_ATTACKERS     float64 = 100 //Cores used to make guesses
	SECONDS_PER_GUESS float64 = SINGLE_GUESS / NUM_ATTACKERS
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MinEntropyMatch

type MinEntropyMatch struct {
	Password         string
	Entropy          float64
	MatchSequence    []match.Match
	CrackTime        float64
	CrackTimeDisplay string
	Score            int
	CalcTime         float64
}

func MinimumEntropyMatchSequence

func MinimumEntropyMatchSequence(password string, matches []match.Match) MinEntropyMatch

Returns minimum entropy

Takes a list of overlapping matches, returns the non-overlapping sublist with
minimum entropy. O(nm) dp alg for length-n password with m candidate matches.

Jump to

Keyboard shortcuts

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