Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

breachcollection-1.0.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

breachcollection-1.0.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file breachcollection-1.0.1.tar.gz.

File metadata

  • Download URL: breachcollection-1.0.1.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

Hashes for breachcollection-1.0.1.tar.gz
Algorithm Hash digest
SHA256 504d1787f5c42aebe06e0c8af962074f1e98b5657fb9fb83477e847b7b4b3fde
MD5 a230054df11e27ccfc839c82a93805b8
BLAKE2b-256 67d91a78c711ed2c770099160a21b0545b0a5128e97b0e7556d01019f75e27f2

See more details on using hashes here.

File details

Details for the file breachcollection-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for breachcollection-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 30b46a3b3539c6ffc51332f0a32960e0351584c74b4f7a85099df9e7b5582076
MD5 02ffdc88f812ad17f946e3e493155772
BLAKE2b-256 659cc745b1f390893e7c4520679738e3052d1aa945ecaf36264aca802bff32ff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page