pawn
Pawn
Pawn is a low-level API client for Pwned Passwords.
Installation
-
Add the dependency to your
shard.yml
:dependencies: pawn: github: GrottoPress/pawn
-
Run
shards update
-
Require Pawn in your app/library:
# ... require "pawn" # ...
Usage
-
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.
Development
Run tests with crystal spec
.
Contributing
- 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.
Repository
pawn
Owner
Statistic
- 6
- 0
- 0
- 1
- 2
- 4 months ago
- August 26, 2021
License
MIT License
Links
Synced at
Thu, 26 Dec 2024 19:31:20 GMT
Languages