mirror of
https://github.com/signalapp/libsignal.git
synced 2024-09-20 03:52:17 +02:00
Add ECPublicKey.generate
This commit is contained in:
parent
4db424c3b2
commit
a3f5b64257
@ -10,7 +10,7 @@ public class Curve {
|
||||
public static final int DJB_TYPE = 0x05;
|
||||
|
||||
public static ECKeyPair generateKeyPair() {
|
||||
ECPrivateKey privateKey = new ECPrivateKey();
|
||||
ECPrivateKey privateKey = ECPrivateKey.generate();
|
||||
ECPublicKey publicKey = privateKey.publicKey();
|
||||
return new ECKeyPair(publicKey, privateKey);
|
||||
}
|
||||
|
@ -10,8 +10,8 @@ import org.signal.client.internal.Native;
|
||||
public class ECPrivateKey {
|
||||
private long handle;
|
||||
|
||||
ECPrivateKey() {
|
||||
this.handle = Native.ECPrivateKey_Generate();
|
||||
static ECPrivateKey generate() {
|
||||
return new ECPrivateKey(Native.ECPrivateKey_Generate());
|
||||
}
|
||||
|
||||
ECPrivateKey(byte[] privateKey) {
|
||||
|
Loading…
Reference in New Issue
Block a user