ex_pwned v0.2.0 ExPwned View Source

ExPwned is a client library for Elixir to interact with haveibeenpwned.com.

Link to this section Summary

Functions

A convenience to check if an account has been breached or not

Returns the number of times a password has been seen in a data breach. It will return zero if the password has not yet been found in a breach

Returns true if this password has been seen in a data breach on Have I Been Pwned

Link to this section Functions

A convenience to check if an account has been breached or not.

Example

iex> ExPwned.breached?("abc@example.com")
true
iex> ExPwned.breached?("abcde@example.com")
false
Link to this function password_breach_count(password) View Source

Returns the number of times a password has been seen in a data breach. It will return zero if the password has not yet been found in a breach.

Example

iex> ExPwned.password_breach_count("123456")
20760336
iex> ExPwned.password_breach_count("correcthorsebatterystaplexkcdrules")
0
Link to this function password_breached?(password) View Source

Returns true if this password has been seen in a data breach on Have I Been Pwned

Example

iex> ExPwned.password_breached?("123456")
true
iex> ExPwned.password_breached?("correcthorsebatterystaplexkcdrules")
false