A Python3 package that integrates the BreachCollection API.
Project description
breachcollection
A package that wraps the Breachcollection API.
The Leaked Passwords API has a vast collection of credentials previously leaked on data breaches.
Via this package, it can be integrated in your website's signup page to ensure your users do not sign up using insecure passwords.
It supports configurable K-Anonimity, meanign that the password is hashed before being sent, and only a portion of the hash is sent, to ensure maximum privacy.
Installation
To install the package, run the following command in your terminal:
pip install breachcollection
Usage
How you can integrate this package in your signup process.
from breachcollection import is_password_safe
bc_call = is_password_safe(password, breachcollection_api_key, n_chars_to_send)
if bc_call == True or bc_call == None:
...
The function will return True if the password has not been found in any leaked databases, and False if it has.
If an error occurs, the error will be printed to the terminal and the function will return None.
By default, n_chars_to_send is 10, so you do not need to specify a value for n_chars_to_send, but you can choose any value between 7 and 32.
The smaller the value, the more private your search will be, but potentially more computationally expensive on your side (therefore, slower, by a couple of milliseconds).
Dependencies
This package requires the requests library to function. It will be automatically installed when you install breachcollection via pip.
requests
License
This project is licensed under the MIT License. See the LICENSE file for details.
Author
BreachCollection
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file breachcollection-1.0.0.tar.gz.
File metadata
- Download URL: breachcollection-1.0.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38c34931d3b3d431dc54c8a9e910e48c999201237e6d84d5a999a1cfe416f6ee
|
|
| MD5 |
0cdd7a54cca51ba91b47a93d8b4e9b83
|
|
| BLAKE2b-256 |
4418e83e9e3221f2ba97a2ed41ff6e2d1deeecab53d5c195ab1b1d2ff1f389fa
|
File details
Details for the file breachcollection-1.0.0-py3-none-any.whl.
File metadata
- Download URL: breachcollection-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fedb069e24cb6dfb03b00087fae52ccc66424a0418a79d6e65442a48bb225406
|
|
| MD5 |
ab24450f83374fee9f6b61701a32824e
|
|
| BLAKE2b-256 |
c9c985edb4108e1f536e2c699b9582ce485c759134ce522c1d0c58b5668ab112
|