Test various Argon2 parameters.

This commit is contained in:
Alan Evans
2020-01-15 16:11:41 -05:00
committed by GitHub
parent ddedf73939
commit ace1855797
7 changed files with 321 additions and 1 deletions

View File

@@ -216,6 +216,8 @@ public class TextSecurePreferences {
private static final String STORAGE_MANIFEST_VERSION = "pref_storage_manifest_version";
private static final String ARGON2_TESTED = "argon2_tested";
public static boolean isScreenLockEnabled(@NonNull Context context) {
return getBooleanPreference(context, SCREEN_LOCK, false);
}
@@ -1339,6 +1341,14 @@ public class TextSecurePreferences {
setLongPreference(context, STORAGE_MANIFEST_VERSION, version);
}
public static boolean isArgon2Tested(Context context) {
return getBooleanPreference(context, ARGON2_TESTED, false);
}
public static void setArgon2Tested(Context context, boolean tested) {
setBooleanPreference(context, ARGON2_TESTED, tested);
}
public static void setBooleanPreference(Context context, String key, boolean value) {
PreferenceManager.getDefaultSharedPreferences(context).edit().putBoolean(key, value).apply();
}