mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-25 19:29:54 +01:00
Move prekey jsonifcation into the push code, add identity key.
This commit is contained in:
@@ -4,6 +4,7 @@ import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import org.whispersystems.textsecure.crypto.InvalidKeyException;
|
||||
import org.whispersystems.textsecure.crypto.KeyUtil;
|
||||
import org.whispersystems.textsecure.crypto.MasterSecret;
|
||||
import org.whispersystems.textsecure.crypto.PreKeyPair;
|
||||
|
||||
@@ -51,6 +52,10 @@ public class PreKeyRecord extends Record {
|
||||
return keyPair;
|
||||
}
|
||||
|
||||
public byte[] getEncodedPublicKey() {
|
||||
return KeyUtil.encodePoint(keyPair.getPublicKey().getQ());
|
||||
}
|
||||
|
||||
public static boolean hasRecord(Context context, long id) {
|
||||
Log.w("PreKeyRecord", "Checking: " + id);
|
||||
return Record.hasRecord(context, PREKEY_DIRECTORY, id+"");
|
||||
|
||||
Reference in New Issue
Block a user