Nothing has been indexed for 0.1.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.

Installation

# Add this to your shard.yml
dependencies:
  pawn:
    github: GrottoPress/pawn
    version: ~> 0.1.0

Then run:

shards install

shard.yml

No shard.yml has been indexed for 0.1.0. You can read it on the repository.

Dependencies

Unknown: the shard.yml for this version has not been read yet.

README

This README is the one indexed from the repository at its latest ref, not from the tag for this version.

Pawn

Pawn is a low-level API client for Pwned Passwords.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      pawn:
        github: GrottoPress/pawn
  2. Run shards update

  3. Require Pawn in your app/library:

    # ...
    require "pawn"
    # ...

Usage

  1. Check if a password appears in any breach:

    Pawn.pwned?("password") # <= true
  2. 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

  1. Fork it
  2. Switch to the master branch: git checkout master
  3. Create your feature branch: git checkout -b my-new-feature
  4. Make your changes, updating changelog and documentation as appropriate.
  5. Commit your changes: git commit
  6. Push to the branch: git push origin my-new-feature
  7. Submit a new Pull Request against the GrottoPress:master branch.