mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-25 19:29:54 +01:00
Encode prekey as full JSON rather than protobuf blobs.
1) Split prekey messages out into full JSON. 2) Add support for retrieving prekeys.
This commit is contained in:
@@ -4,7 +4,6 @@ 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;
|
||||
|
||||
@@ -52,10 +51,6 @@ 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