Skip to content
PwnedPass provides a Go library for accessing the Pwned Password API.
Go Shell
Branch: master
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.
.circleci
cmd/pwnedpass
.gitignore
LICENSE.md
README.md
build.sh
doc.go
go.mod
go.sum
pwnedpass.go
pwnedpass_test.go
pwnedpass_test_data.go

README.md

PwnedPass

Godoc License: MIT CI: CircleCI

PwnedPass is a Go library for accessing the Pwned Password API. It currently only supports the V2 version of the API. It's got a dead simple API, tests, and benchmarks.

Usage

See godoc for usage and documentation.

CLI

You can visit releases to download a stable version of the CLI tool, or you can install from the latest source with:

go get github.com/fharding1/pwnedpass/cmd/pwnedpass

Usage

Using the CLI tool is fairly simple:

pwnedpass password
pwnedpass "a password with spaces"

Performance

Running on my computer, the benchmark results I get are:

BenchmarkCount-8              	    5000	    216640 ns/op
BenchmarkCountIntegration-8   	      50	  26431351 ns/op

The test with a mock local HTTP server takes about 231893 ns/op, while the integration tests against the actual API take 24331000 ns/op, meaning the only real limitation is the speed of the API and your network.

You can’t perform that action at this time.