Pawn is a low-level API client for Pwned Passwords.
-
Add the dependency to your
shard.yml
:dependencies: pawn: github: GrottoPress/pawn
-
Run
shards update
-
Require Pawn in your app/library:
# ... require "pawn" # ...
-
Check if a password appears in any breach:
Pawn.pwned?("password") # <= true
-
Find how many times a password appears in breaches:
Pawn.count("password") # <= 3861493
Either method accepts an optional padding
, a Bool
argument that sends a Add-Padding
header along with the request to Pwned Passwords API.
Run tests with crystal spec
.
- Fork it
- Switch to the
master
branch:git checkout master
- Create your feature branch:
git checkout -b my-new-feature
- Make your changes, updating changelog and documentation as appropriate.
- Commit your changes:
git commit
- Push to the branch:
git push origin my-new-feature
- Submit a new Pull Request against the
GrottoPress:master
branch.