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
- 3 months ago
- August 26, 2021
License
MIT License
Links
Synced at
Sun, 24 Nov 2024 11:02:10 GMT
Languages