firebase-scrypt


Namefirebase-scrypt JSON
Version 0.1.0 PyPI version JSON
download
home_page
SummaryPython implementation of Firebase's scrypt password hashing algorithm.
upload_time2023-08-24 12:26:48
maintainer
docs_urlNone
author
requires_python>=3.7
licenseMIT License Copyright (c) 2021 Jaakko Laurila Copyright (c) 2023 Nicholas Hairs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords firebase scrypt
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # firebase-scrypt-python

[![PyPi](https://img.shields.io/pypi/v/firebase-scrypt.svg)](https://pypi.python.org/pypi/firebase-scrypt/)
[![PyPI - Status](https://img.shields.io/pypi/status/firebase-scrypt)](https://pypi.python.org/pypi/firebase-scrypt/)
[![Python Versions](https://img.shields.io/pypi/pyversions/firebase-scrypt.svg)](https://github.com/nhairs/firebase-scrypt-python)
[![License](https://img.shields.io/github/license/nhairs/firebase-scrypt.svg)](https://github.com/nhairs/firebase-scrypt-python)

Python implementation of Firebase's scrypt password hashing algorithm. Based on [firebase/scrypt](https://github.com/firebase/scrypt).

This is a fork of [Jaakkol/firebase-scrypt-python](https://github.com/JaakkoL/firebase-scrypt-python) to allow packaging for PyPI.

## Installation
### Install via pip
```shell
pip3 install firebase-scrypt
```

## Usage

```python

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](https://github.com/nhairs/firebase-scrypt/issues).

In the case of bug reports, please help me help you by following best practices [1](https://marker.io/blog/write-bug-report/) [2](https://www.chiark.greenend.org.uk/~sgtatham/bugs.html).

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`](https://github.com/nahirs/firebase-scrypt-python/blob/master/LICENCE).

This project may include other open source licenced software - see [`NOTICE`](https://github.com/nhairs/firebase-scrypt-python/blob/master/NOTICE).


## Authors
- Nicholas Hairs - [www.nicholashairs.com](https://www.nicholashairs.com)
- [Jaakko Laurila](https://github.com/JaakkoL)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "firebase-scrypt",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "Nicholas Hairs <info@nicholashairs.com>",
    "keywords": "firebase,scrypt",
    "author": "",
    "author_email": "Jaakko Laurila <JaakkoL@users.noreply.github.com>, Nicholas Hairs <info@nicholashairs.com>",
    "download_url": "",
    "platform": null,
    "description": "# firebase-scrypt-python\n\n[![PyPi](https://img.shields.io/pypi/v/firebase-scrypt.svg)](https://pypi.python.org/pypi/firebase-scrypt/)\n[![PyPI - Status](https://img.shields.io/pypi/status/firebase-scrypt)](https://pypi.python.org/pypi/firebase-scrypt/)\n[![Python Versions](https://img.shields.io/pypi/pyversions/firebase-scrypt.svg)](https://github.com/nhairs/firebase-scrypt-python)\n[![License](https://img.shields.io/github/license/nhairs/firebase-scrypt.svg)](https://github.com/nhairs/firebase-scrypt-python)\n\nPython implementation of Firebase's scrypt password hashing algorithm. Based on [firebase/scrypt](https://github.com/firebase/scrypt).\n\nThis is a fork of [Jaakkol/firebase-scrypt-python](https://github.com/JaakkoL/firebase-scrypt-python) to allow packaging for PyPI.\n\n## Installation\n### Install via pip\n```shell\npip3 install firebase-scrypt\n```\n\n## Usage\n\n```python\n\nimport firebase_scrypt\n\n# Sample Password hash parameters from Firebase Console.\nsalt_separator = \"Bw==\"\nsigner_key = \"jxspr8Ki0RYycVU8zykbdLGjFQ3McFUH0uiiTvC8pVMXAn210wjLNmdZJzxUECKbm0QsEmYUSDzZvpjeJ9WmXA==\"\nrounds= 8\nmem_cost=14\n\n# Exported user user accounts salt and password hash.\nsalt = \"42xEC+ixf3L2lw==\"\npassword_hash=\"lSrfV15cpx95/sZS2W9c9Kp6i/LVgQNDNC/qzrCnh1SAyZvqmZqAjTdn3aoItz+VHjoZilo78198JAdRuid5lQ==\"\n\n# User's plain text password\npassword = \"user1password\"\n\nis_valid = firebase_scrypt.verify_password(\n    password=password,\n    known_hash=password_hash,\n    salt=salt,\n    salt_separator=salt_separator,\n    signer_key=signer_key,\n    rounds=rounds,\n    mem_cost=mem_cost\n)\n\nis_valid # True / False\n\n```\n\n## Bugs, Feature Requests etc\nTLDR: Please [submit an issue on github](https://github.com/nhairs/firebase-scrypt/issues).\n\nIn the case of bug reports, please help me help you by following best practices [1](https://marker.io/blog/write-bug-report/) [2](https://www.chiark.greenend.org.uk/~sgtatham/bugs.html).\n\nIn 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.\n\n## Development\nThe 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`.\n\n## Licence\nThis project is licenced under the MIT Licence - see [`LICENCE`](https://github.com/nahirs/firebase-scrypt-python/blob/master/LICENCE).\n\nThis project may include other open source licenced software - see [`NOTICE`](https://github.com/nhairs/firebase-scrypt-python/blob/master/NOTICE).\n\n\n## Authors\n- Nicholas Hairs - [www.nicholashairs.com](https://www.nicholashairs.com)\n- [Jaakko Laurila](https://github.com/JaakkoL)\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2021 Jaakko Laurila Copyright (c) 2023 Nicholas Hairs  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Python implementation of Firebase's scrypt password hashing algorithm.",
    "version": "0.1.0",
    "project_urls": {
        "homepage": "https://github.com/nhairs/firebase-scrypt-python"
    },
    "split_keywords": [
        "firebase",
        "scrypt"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7b17e6b4a0871e7067069575c062c1af6bca8ec04c8979a6c099e37c18fd86e4",
                "md5": "24574eac8fd8bb022a3a29ede2b046bf",
                "sha256": "f0019f54e496db25829aae13bf178f5c40e47d7dadf39fc56cddfb511721e8ae"
            },
            "downloads": -1,
            "filename": "firebase_scrypt-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "24574eac8fd8bb022a3a29ede2b046bf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 6984,
            "upload_time": "2023-08-24T12:26:48",
            "upload_time_iso_8601": "2023-08-24T12:26:48.319860Z",
            "url": "https://files.pythonhosted.org/packages/7b/17/e6b4a0871e7067069575c062c1af6bca8ec04c8979a6c099e37c18fd86e4/firebase_scrypt-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-24 12:26:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "nhairs",
    "github_project": "firebase-scrypt-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "firebase-scrypt"
}
        
Elapsed time: 2.20529s