mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 20:15:21 +00:00
fix: don't put encrypted in encrypted
This commit is contained in:
parent
596b02cfaf
commit
f10a99ce41
@ -138,11 +138,11 @@ public class IdentityKeyUtil {
|
||||
Editor preferencesEditor = preferences.edit();
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
KeyStoreHelper.SealedData encryptedSecret = KeyStoreHelper.seal(value.getBytes());
|
||||
boolean isEncryptedSuffix = key.endsWith(ENCRYPTED_SUFFIX);
|
||||
if (isEncryptedSuffix) {
|
||||
preferencesEditor.putString(key, encryptedSecret.serialize());
|
||||
preferencesEditor.putString(key, value);
|
||||
} else {
|
||||
KeyStoreHelper.SealedData encryptedSecret = KeyStoreHelper.seal(value.getBytes());
|
||||
preferencesEditor.putString(key+ENCRYPTED_SUFFIX, encryptedSecret.serialize());
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user