Comments (4)
It may also be useful to set some flag for which set of default parameters may be preferred.
Some possible implementations:
- Boolean
reduced_memory
. Causes defaults to be overwritten by reduced memory defaults. - Passing a parameter object. Could be part of the constructor and override defaults or separate from constructor as a class method:
(This isn't a complete implementation, as it doesn't allow for parameter override --- just a proof of concept)
class PasswordHasher: ... @classmethod def with_default_parameters(cls, parameters: Parameters) -> PasswordHasher: # note: DefaultParameters and LowMemoryDefeaultParameters objects # would need to be defined elsewhere return PasswordHasher( time_cost=parameter.time_cost, ... )
LowMemoryPasswordHasher
child class.
from argon2-cffi.
Hi Brendan, sorry for the long silence. When you opened this issue I was traveling (!!!!) and I've been procrastinating on a release ever since because it's a big topic.
I think the best way forward is making the low-mem case the default and allow to create hashers from Parameters
as per your option 2.
It was so clear that they had to publish the final version a few days after I published a basically non-release. š¤Ŗ
from argon2-cffi.
I think the best way forward is making the low-mem case the default and allow to create hashers from
Parameters
as per your option 2.
Would this provide a default high memory Parameters
object? e.g. something like
from argon2 import PasswordHasher, HighMemoryParameters
high_mem_hasher = PasswordHasher.from_parameters(HighMemoryParameters)
from argon2-cffi.
Yeah, Iād supply both RFC options at least. Maybe additionally the current defaults for people who want to keep them. Could live in a separate module argon2.profiles.RFC9106HighMemory
or something.
from argon2-cffi.
Related Issues (20)
- 21.2.0: pep517 does not build cython modules HOT 6
- 21.1.0: `notebook` test suite is crashing with SIGILL in _cffi_backend.cpython.*so DSO HOT 11
- Inconsistent advice for key derivation HOT 5
- How to avoid timing attacks? HOT 1
- hash function return + / verify issue with sqlite HOT 3
- Question: Can output from argon2.low_level.hash_secret_raw() ā bytes directly used to derive aes key? HOT 3
- Associated data cannot be specified in the low_level functions HOT 10
- Support password verification without sending the password from client to server HOT 5
- Make hash verification return True or False HOT 4
- Second salt HOT 1
- hash() got an unexpected keyword argument 'salt' HOT 1
- would a python-3.9 wheel be possible ? HOT 13
- seems missing _ffi.abi3.so when pip installing in docker HOT 7
- Failed Source Build on Apple Silicon HOT 9
- Wheel support for linux aarch64 HOT 4
- Unable to install on Xavier NX HOT 1
- Fail to install by pip on macOS 11.0.1 Big Sur HOT 11
- 20.1.0: sphinx warnings HOT 4
- 20.1.0: pytest warnings HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from argon2-cffi.