pawn

A low-level API client for Pwned Passwords pwned-passwords have-i-been-pwned http-client api
0.1.1 Latest release released

This repo seems to be no longer available at GrottoPress/pawn.

Git synchronization failed . Last successful sync was .

Help find it again! … or have it archived.

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.
pawn:
  github: GrottoPress/pawn
  version: ~> 0.1.1
License MIT
Crystal ~> 1.0

Authors

Dependencies 1

  • hapi ~> 0.1.0
    {'github' => 'GrottoPress/hapi', 'version' => '~> 0.1.0'}

Development Dependencies 1

  • webmock ~> 0.14.0
    {'github' => 'manastech/webmock.cr', 'version' => '~> 0.14.0'}

Dependents 1

Last synced .
search fire star recently