Go package that returns information on whether a given password has been involved in a data breach using https://haveibeenpwned.com
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
pwchecker.go

README.md

pwchecker

Exports a single function:

func CheckForPwnage(pw string) (*Pwd, error)

The function checks the password using the http://haveibeenpwned.com API.

It returns a pointer to a struct like so:

type Pwd struct {
	Pwnd   bool
	Pwd    string
	TmPwnd string
}

Pwnd is true if the password has been pwned.
Pwd is the original password passed to the fucntion.
TmPwnd is a string with the number of times the password has been pwned.