Module: Pwned
- Defined in:
- lib/pwned.rb,
lib/pwned/error.rb,
lib/pwned/version.rb,
lib/pwned/password.rb
Overview
The main namespace for Pwned
. Includes convenience methods for
getting the results for a password.
Defined Under Namespace
Classes: Error, Password, TimeoutError
Constant Summary collapse
- VERSION =
The current version of the
pwned
gem. "1.2.1"
Class Method Summary collapse
-
.pwned?(password, request_options = {}) ⇒ Boolean
Returns
true
when the password has been pwned. -
.pwned_count(password, request_options = {}) ⇒ Integer
Returns number of times the password has been pwned.
Class Method Details
.pwned?(password, request_options = {}) ⇒ Boolean
Returns true
when the password has been pwned.
38 39 40 |
# File 'lib/pwned.rb', line 38 def self.pwned?(password, ={}) Pwned::Password.new(password, ).pwned? end |
.pwned_count(password, request_options = {}) ⇒ Integer
Returns number of times the password has been pwned.
57 58 59 |
# File 'lib/pwned.rb', line 57 def self.pwned_count(password, ={}) Pwned::Password.new(password, ).pwned_count end |