Duzzuti/passwd-manager
[NTH] New Chainhash functions (new contributers welcome)
Aperta
#12 aperta il 26 mag 2023
easyenhancementgood first issue
Metriche repository
- Star
- (9 stelle)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
- Difficulty (1-10): 3
- Location/Files: pwfunc.h/pwfunc.cpp
- Current behaviour:
A chainhash is an hash which is applied on its previous result (for a given number of iterations).
You can copy some code from the implemented chainhashes.
use this->hash->hash() as the hash function.
there are already 4 types of chainhashes imnplemented.:
- A chainhash which hashes the last hash again
- A chainhash which hashes the last hash + a constant salt
- A chainhash which hashes the last hash + an incrementing number
- A chainhash which hashes the last hash + a constant salt + an incrementing number
- A chainhash which hashes the last hash + a quadratic salt #4
- Wished behaviour:
New chainhashes wished
Define you own chainhash function in the pwfunc files.
Constraints:
- it has to take at least a std::string password and an iteration number
- it can take more arguments if needed, but all added arguments have to be under 256 Bytes memory (because we have to save them in a buffer, this constraint is more theoretically but you should not expect long strings or other big data to get passed)
- the result has to be the same with the same arguments (obviously)
if you need help or have a hard time understanding certain things, you are welcome to comment on this issue
Good luck