modulepackage
2.2.0+incompatible
Repository: https://github.com/fharding1/pwnedpass.git
Documentation: pkg.go.dev
# README
PwnedPass
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 install 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.
# Packages
No description provided by the author
# Functions
Count uses DefaultClient to count the number of password returned from the PwnedPass API.
# Constants
BaseURLV2 is the base URL for the V2 Pwned Passwords API.
# Variables
DefaultClient is the default client used for making requests to the PwnedPass API.
# Interfaces
Client describes an interface for interacting with the PwnedPasswords API to get password breach occurence counts.