Honor default preferences instead of using hardcoded defaults #41
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contrary to the default preference value of 2000 iterations a hardcoded value of 1000 is used. Only after opening the settings dialog the 2000 iterations will become effective. I fixed it here. The 1000 default value is hardcoded into
app/src/main/java/org/secuso/privacyfriendlypasswordgenerator/activities/SettingsActivity.java
as well, even though it does not seem to have an effect here.
Both my Java and Android knowledge are very limited so far, so this is rather a suggestion that I basically copied from Stackexchange, so someone should look into this,
I strongly vote for turning the hash algorithm / number of iterations into per-account settings, too. I do unterstand that from a technical point those are rather per-device settings, but making them per-account settings would
a) serve as a reminder that those values actually effect the generated password (I know its in the docs, I'm leaning more towards practicality here)
b) Would allow to open the 'old password / new password' dialog as right now, changing the hash value 'corrupts' the entire db
but goes otherwise unnoticed
c) Users can choose to wait longer for the generated password if the use-case for that password is worth the sacrifice