Coder Social home page Coder Social logo

nhairs / firebase-scrypt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jaakkol/firebase-scrypt-python

0.0 1.0 0.0 34 KB

Python implementation of Firebase's scrypt password hashing algorigtm.

License: MIT License

Shell 64.61% Python 21.14% Dockerfile 14.25%
firebase-auth python scrypt python-library

firebase-scrypt's Introduction

firebase-scrypt-python

PyPi PyPI - Status Python Versions License

Python implementation of Firebase's scrypt password hashing algorithm. Based on firebase/scrypt.

This is a fork of Jaakkol/firebase-scrypt-python to allow packaging for PyPI.

Installation

Install via pip

pip3 install firebase-scrypt

Usage

import firebase_scrypt

# Sample Password hash parameters from Firebase Console.
salt_separator = "Bw=="
signer_key = "jxspr8Ki0RYycVU8zykbdLGjFQ3McFUH0uiiTvC8pVMXAn210wjLNmdZJzxUECKbm0QsEmYUSDzZvpjeJ9WmXA=="
rounds= 8
mem_cost=14

# Exported user user accounts salt and password hash.
salt = "42xEC+ixf3L2lw=="
password_hash="lSrfV15cpx95/sZS2W9c9Kp6i/LVgQNDNC/qzrCnh1SAyZvqmZqAjTdn3aoItz+VHjoZilo78198JAdRuid5lQ=="

# User's plain text password
password = "user1password"

is_valid = firebase_scrypt.verify_password(
    password=password,
    known_hash=password_hash,
    salt=salt,
    salt_separator=salt_separator,
    signer_key=signer_key,
    rounds=rounds,
    mem_cost=mem_cost
)

is_valid # True / False

Bugs, Feature Requests etc

TLDR: Please submit an issue on github.

In the case of bug reports, please help me help you by following best practices 1 2.

In the case of feature requests, please provide background to the problem you are trying to solve so to help find a solution that makes the most sense for the library as well as your usecase.

Development

The only development dependencies are bash and docker. All actions are run within docker for ease of use. See ./dev.sh help for commands. Typical commands are format, lint, test, repl, build.

Licence

This project is licenced under the MIT Licence - see LICENCE.

This project may include other open source licenced software - see NOTICE.

Authors

firebase-scrypt's People

Contributors

nhairs avatar jaakkol avatar mjkweon17 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.