zxcvbn

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2019 License: MIT Imports: 7 Imported by: 23

README

GoDoc Build Status Coverage Status

This is a go port of zxcvbn, a password strength estimator inspired by password crackers. Through pattern matching and conservative estimation, it recognizes and weighs 30k common passwords, common names and surnames according to US census data, popular English words from Wikipedia and US television and movies, and other common patterns like dates, repeats (aaa), sequences (abcd), keyboard patterns (qwertyuiop), and l33t speak.

This port aims to be fully compatible (i.e. give the same results for a given password using the same set of dictionnaries) with the upstream coffeescript libray from Dropbox: all unit tests from the upstream library have been ported (and even more tests have been added) to ensure that this holds.


Current status:

  • this library should be 100% compatible (score, sequence and number of guesses) with release 4.4.2 of the coffeescript library.
  • feedback messages are missing

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EstimatedTimes

type EstimatedTimes struct {
	CrackTimesSeconds map[string]float64 `json:"crack_times_seconds"`
	CrashTimesDisplay map[string]string  `json:"crack_times_display"`
	Score             int
}

type Result

type Result struct {
	Guesses  float64
	Sequence []*match.Match
	Score    int
	CalcTime float64
}

func PasswordStrength

func PasswordStrength(password string, userInputs []string) Result

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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