org.whispersystems.libsignal.IdentityKeyPair Maven / Gradle / Ivy
/**
* Copyright (C) 2014-2016 Open Whisper Systems
*
* Licensed according to the LICENSE file in this repository.
*/
package org.whispersystems.libsignal;
import org.signal.client.internal.Native;
import org.whispersystems.libsignal.ecc.ECPrivateKey;
/**
* Holder for public and private identity key pair.
*
* @author Moxie Marlinspike
*/
public class IdentityKeyPair {
private final IdentityKey publicKey;
private final ECPrivateKey privateKey;
public IdentityKeyPair(IdentityKey publicKey, ECPrivateKey privateKey) {
this.publicKey = publicKey;
this.privateKey = privateKey;
}
public IdentityKey getPublicKey() {
return publicKey;
}
public ECPrivateKey getPrivateKey() {
return privateKey;
}
byte[] serialize() {
return Native.IdentityKeyPair_Serialize(this.publicKey.nativeHandle(), this.privateKey.nativeHandle());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy