Git Product home page Git Product logo

flask-argon2's People

Contributors

niecke avatar red-coracle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

flask-argon2's Issues

flask-argon2 not support FreeBSD

Hey, Due to a lack of FreeBSD support for dependencies such as Argon2-cffi-bindings & Argon2-cffi which you use in flask_argon_2, impossible to install on FreeBSD, FreeBSD support would be super interesting in a recent update

Afi.

Tag release

Could you please tag releases? This makes it more convenient to find the code to specific pypi releases.

PyPi distributes wrong code

It seems like pypi is distributing an old version of the code. When running the following:

PS C:\Users\nieck> pip install flask_argon2
Collecting flask_argon2
  Using cached https://files.pythonhosted.org/packages/cd/73/00ed65e317cd93b715c514f61b68960b05dfb87184241e1d7cbb4359f30a/Flask_Argon2-0.1.5.0-py3-none-any.whl
Requirement already satisfied: argon2-cffi in c:\users\nieck\anaconda3\lib\site-packages (from flask_argon2) (19.1.0)
Requirement already satisfied: Flask in c:\users\nieck\anaconda3\lib\site-packages (from flask_argon2) (1.0.3)
Requirement already satisfied: six in c:\users\nieck\anaconda3\lib\site-packages (from argon2-cffi->flask_argon2) (1.11.0)
Requirement already satisfied: cffi>=1.0.0 in c:\users\nieck\anaconda3\lib\site-packages (from argon2-cffi->flask_argon2) (1.11.5)
Requirement already satisfied: click>=5.1 in c:\users\nieck\anaconda3\lib\site-packages (from Flask->flask_argon2) (7.0)
Requirement already satisfied: Werkzeug>=0.14 in c:\users\nieck\anaconda3\lib\site-packages (from Flask->flask_argon2) (0.14.1)
Requirement already satisfied: itsdangerous>=0.24 in c:\users\nieck\anaconda3\lib\site-packages (from Flask->flask_argon2) (0.24)
Requirement already satisfied: Jinja2>=2.10 in c:\users\nieck\anaconda3\lib\site-packages (from Flask->flask_argon2) (2.10)
Requirement already satisfied: pycparser in c:\users\nieck\anaconda3\lib\site-packages (from cffi>=1.0.0->argon2-cffi->flask_argon2) (2.18)
Requirement already satisfied: MarkupSafe>=0.23 in c:\users\nieck\anaconda3\lib\site-packages (from Jinja2>=2.10->Flask->flask_argon2) (1.0)
Installing collected packages: flask-argon2
Successfully installed flask-argon2-0.1.5.0

After that the flask_argon2.Argon2 still has no init_app function and flask_argon2.__dict__ shows still the old Version 0.1.3. When looking at the source code file from pypi it is the right version.

I am confused.

default settings

Hello,

Seems it's not possible to change default argon2 settings, at least I didn't figure out the way to set them via typical app.config:

# example code (custom flask script)

from flask_argon2 import Argon2
from flask import Flask
app = Flask(__name__)

# example trying to change only memory cost value
app.config['ARGON2_MEMORY_COST'] = 131072
app.config['DEFAULT_MEMORY_COST'] = 131072
crypt_argon2 = Argon2(app)

looks like the Argon2 module is taking pre-set default values from argon2 module (password_hasher.py), and ignores any values passed in via app.config. And unless changing the argon2 module code, I can't find other way to set custom values.

# argon2/password_hasher.py
from .profiles import RFC_9106_LOW_MEMORY
DEFAULT_RANDOM_SALT_LENGTH = RFC_9106_LOW_MEMORY.salt_len
DEFAULT_HASH_LENGTH = RFC_9106_LOW_MEMORY.hash_len
DEFAULT_TIME_COST = RFC_9106_LOW_MEMORY.time_cost
DEFAULT_MEMORY_COST = RFC_9106_LOW_MEMORY.memory_cost
DEFAULT_PARALLELISM = RFC_9106_LOW_MEMORY.parallelism

Values passed to argon2 hash function:

# argon2/profiles.py
# SECOND RECOMMENDED option per RFC 9106.
RFC_9106_LOW_MEMORY = Parameters(
    type=Type.ID,
    version=19,
    salt_len=16,
    hash_len=32,
    time_cost=3,
    memory_cost=65536,  # 64 MiB
    parallelism=4,
)

Is this intended, or I am doing something wrong?

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.