pwned_password.cr

Calls HIBP API to check whether password was listed in a breach

pwned_password - Calls HIBP API to check whether password was listed in a breach

Version Build Status License

Implements API v2 of Troy Hunt's HIBP to check whether a given password has been exposed in a breach.

https://haveibeenpwned.com/API/v2#PwnedPasswords

Installation

  1. Add the dependency to your shard.yml:
dependencies:
  pwned_password:
    github: anamba/pwned_password.cr
  1. Run shards install

Usage

require "pwned_password_check"

PwnedPassword.search("correct horse battery staple") # -> 2 (found in 2 breaches)
PwnedPassword.search("f7Yr,f9dffF?eKeDpjepGwcc")     # -> nil (not found)

Contributing

  1. Fork it (https://github.com/anamba/pwned_password/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Repository

pwned_password.cr

Owner
Statistic
  • 6
  • 0
  • 0
  • 0
  • 0
  • about 3 years ago
  • December 5, 2018
License

MIT License

Links
Synced at

Sun, 05 May 2024 22:50:41 GMT

Languages