mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 18:00:02 +01:00
Test various Argon2 parameters.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user