You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Good catch. The issue is that the __init__ of Argon2 doesn't call init_app, so the app-level configuration isn't applied. I have a patch that should fix it and will upload a new release once I finish testing.
Thank you, my quick-fix was to edit the lib directly and set params as needed, but it's 'dirty' fix, and setting this via env variables would be much better.
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:
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.
Values passed to argon2 hash function:
Is this intended, or I am doing something wrong?
The text was updated successfully, but these errors were encountered: