mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-03 08:32:34 +00:00
Added more loki databases.
This commit is contained in:
@@ -19,6 +19,7 @@ package org.thoughtcrime.securesms.crypto;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.thoughtcrime.securesms.crypto.storage.TextSecurePreKeyStore;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
import org.whispersystems.libsignal.IdentityKeyPair;
|
||||
@@ -92,6 +93,16 @@ public class PreKeyUtil {
|
||||
|
||||
// region - Loki
|
||||
|
||||
public static synchronized @Nullable SignedPreKeyRecord getActiveSignedPreKey(Context context) {
|
||||
SignedPreKeyStore signedPreKeyStore = new TextSecurePreKeyStore(context);
|
||||
try {
|
||||
return signedPreKeyStore.loadSignedPreKey(getActiveSignedPreKeyId(context));
|
||||
} catch (InvalidKeyIdException e) {
|
||||
// Fall through
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public synchronized static List<PreKeyRecord> generatePreKeys(Context context, int amount) {
|
||||
PreKeyStore preKeyStore = new TextSecurePreKeyStore(context);
|
||||
List<PreKeyRecord> records = new LinkedList<>();
|
||||
|
||||
Reference in New Issue
Block a user