public class SignalOmemoKeyUtil extends OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
OmemoKeyUtil.Bundle
BUNDLE
Constructor and Description |
---|
SignalOmemoKeyUtil() |
Modifier and Type | Method and Description |
---|---|
OmemoDevice |
addressAsOmemoDevice(org.whispersystems.libsignal.SignalProtocolAddress address)
Convert a crypto-lib specific contact object into an OmemoDevice.
|
org.whispersystems.libsignal.state.PreKeyBundle |
bundleFromOmemoBundle(OmemoBundleVAxolotlElement bundle,
OmemoDevice contact,
int preKeyId)
Build a crypto-lib specific PreKeyBundle (T_Bundle) using a PreKey from the OmemoBundleElement 'bundle'.
|
OmemoSession<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher> |
createOmemoSession(OmemoManager omemoManager,
OmemoStore<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher> omemoStore,
OmemoDevice from)
Create a new crypto-specific Session object.
|
OmemoSession<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher> |
createOmemoSession(OmemoManager omemoManager,
OmemoStore<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher> omemoStore,
OmemoDevice contact,
org.whispersystems.libsignal.IdentityKey identityKey)
Create a new concrete OmemoSession with a contact.
|
org.whispersystems.libsignal.ecc.ECPublicKey |
ellipticCurvePublicKeyFromBytes(byte[] data)
Deserialize an elliptic curve public key from bytes.
|
org.whispersystems.libsignal.IdentityKeyPair |
generateOmemoIdentityKeyPair()
Generate a new IdentityKeyPair.
|
HashMap<Integer,org.whispersystems.libsignal.state.PreKeyRecord> |
generateOmemoPreKeys(int currentPreKeyId,
int count)
Generate 'count' new PreKeys beginning with id 'startId'.
|
org.whispersystems.libsignal.state.SignedPreKeyRecord |
generateOmemoSignedPreKey(org.whispersystems.libsignal.IdentityKeyPair identityKeyPair,
int currentPreKeyId)
Generate a new signed preKey.
|
OmemoFingerprint |
getFingerprint(org.whispersystems.libsignal.IdentityKey identityKey)
Return the fingerprint of an identityKey.
|
byte[] |
identityKeyForBundle(org.whispersystems.libsignal.IdentityKey identityKey)
Prepare an identityKey for transport in an OmemoBundleElement (serialize it).
|
org.whispersystems.libsignal.IdentityKey |
identityKeyFromBytes(byte[] data)
Deserialize an identityKey from a byte array.
|
org.whispersystems.libsignal.IdentityKey |
identityKeyFromPair(org.whispersystems.libsignal.IdentityKeyPair identityKeyPair)
Extract the public identityKey from an identityKeyPair.
|
org.whispersystems.libsignal.IdentityKeyPair |
identityKeyPairFromBytes(byte[] data)
Deserialize an identityKeyPair from a byte array.
|
byte[] |
identityKeyPairToBytes(org.whispersystems.libsignal.IdentityKeyPair identityKeyPair)
serialize an identityKeyPair into bytes.
|
byte[] |
identityKeyToBytes(org.whispersystems.libsignal.IdentityKey identityKey)
Serialize an identityKey into bytes.
|
org.whispersystems.libsignal.SignalProtocolAddress |
omemoDeviceAsAddress(OmemoDevice contact)
Convert an OmemoDevice to a crypto-lib specific contact format.
|
byte[] |
preKeyForBundle(org.whispersystems.libsignal.state.PreKeyRecord preKeyRecord)
Prepare a preKey for transport in an OmemoBundleElement.
|
org.whispersystems.libsignal.state.PreKeyRecord |
preKeyFromBytes(byte[] bytes)
Deserialize a preKey from a byte array.
|
byte[] |
preKeyPublicKeyForBundle(org.whispersystems.libsignal.ecc.ECPublicKey preKey)
Prepare an elliptic curve preKey for transport in an OmemoBundleElement.
|
byte[] |
preKeyToBytes(org.whispersystems.libsignal.state.PreKeyRecord preKeyRecord)
Serialize a preKey into a byte array.
|
org.whispersystems.libsignal.state.SessionRecord |
rawSessionFromBytes(byte[] data)
Deserialize a raw OMEMO Session from bytes.
|
byte[] |
rawSessionToBytes(org.whispersystems.libsignal.state.SessionRecord session)
Serialize a raw OMEMO session into a byte array.
|
org.whispersystems.libsignal.state.SignedPreKeyRecord |
signedPreKeyFromBytes(byte[] data)
Deserialize a signedPreKey from a byte array.
|
int |
signedPreKeyIdFromKey(org.whispersystems.libsignal.state.SignedPreKeyRecord signedPreKey)
return the id of the given signedPreKey.
|
byte[] |
signedPreKeyPublicForBundle(org.whispersystems.libsignal.state.SignedPreKeyRecord signedPreKey)
Prepare a public signedPreKey for transport in a bundle.
|
byte[] |
signedPreKeySignatureFromKey(org.whispersystems.libsignal.state.SignedPreKeyRecord signedPreKey)
Extract the signature from a signedPreKey.
|
byte[] |
signedPreKeyToBytes(org.whispersystems.libsignal.state.SignedPreKeyRecord signedPreKeyRecord)
Serialize a signedPreKey into a byte array.
|
addInBounds, preKeyPublicFromBytes, preKeyPublisKeysForBundle, prettyFingerprint, prettyFingerprint, signedPreKeyPublicFromBytes
public SignalOmemoKeyUtil()
public org.whispersystems.libsignal.IdentityKeyPair generateOmemoIdentityKeyPair()
OmemoKeyUtil
generateOmemoIdentityKeyPair
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
public HashMap<Integer,org.whispersystems.libsignal.state.PreKeyRecord> generateOmemoPreKeys(int currentPreKeyId, int count)
OmemoKeyUtil
generateOmemoPreKeys
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
currentPreKeyId
- start idcount
- how many keys do we want to generatepublic org.whispersystems.libsignal.state.SignedPreKeyRecord generateOmemoSignedPreKey(org.whispersystems.libsignal.IdentityKeyPair identityKeyPair, int currentPreKeyId) throws CorruptedOmemoKeyException
OmemoKeyUtil
generateOmemoSignedPreKey
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
identityKeyPair
- identityKeyPair used to sign the preKeycurrentPreKeyId
- id that the preKey will haveCorruptedOmemoKeyException
- when the identityKeyPair is invalidpublic org.whispersystems.libsignal.state.SignedPreKeyRecord signedPreKeyFromBytes(byte[] data) throws IOException
OmemoKeyUtil
signedPreKeyFromBytes
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
data
- byte arrayIOException
- when something goes wrongpublic byte[] signedPreKeyToBytes(org.whispersystems.libsignal.state.SignedPreKeyRecord signedPreKeyRecord)
OmemoKeyUtil
signedPreKeyToBytes
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
signedPreKeyRecord
- signedPreKeypublic OmemoSession<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher> createOmemoSession(OmemoManager omemoManager, OmemoStore<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher> omemoStore, OmemoDevice contact, org.whispersystems.libsignal.IdentityKey identityKey)
OmemoKeyUtil
createOmemoSession
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
omemoManager
- omemoManager of our device.omemoStore
- omemoStorecontact
- device to establish the session withidentityKey
- identityKey of the devicepublic OmemoSession<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher> createOmemoSession(OmemoManager omemoManager, OmemoStore<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher> omemoStore, OmemoDevice from)
OmemoKeyUtil
createOmemoSession
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
omemoManager
- omemoManager of our device.omemoStore
- omemoStore where we can save the session, get keys from etc.from
- the device we want to create the session with.public org.whispersystems.libsignal.state.SessionRecord rawSessionFromBytes(byte[] data) throws IOException
OmemoKeyUtil
rawSessionFromBytes
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
data
- bytesIOException
- when something goes wrongpublic byte[] rawSessionToBytes(org.whispersystems.libsignal.state.SessionRecord session)
OmemoKeyUtil
rawSessionToBytes
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
session
- raw sessionpublic org.whispersystems.libsignal.IdentityKeyPair identityKeyPairFromBytes(byte[] data) throws CorruptedOmemoKeyException
OmemoKeyUtil
identityKeyPairFromBytes
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
data
- byte arrayCorruptedOmemoKeyException
- if the key is damaged of malformedpublic org.whispersystems.libsignal.IdentityKey identityKeyFromBytes(byte[] data) throws CorruptedOmemoKeyException
OmemoKeyUtil
identityKeyFromBytes
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
data
- byte arrayCorruptedOmemoKeyException
- if the key is damaged or malformedpublic org.whispersystems.libsignal.ecc.ECPublicKey ellipticCurvePublicKeyFromBytes(byte[] data) throws CorruptedOmemoKeyException
OmemoKeyUtil
ellipticCurvePublicKeyFromBytes
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
data
- bytesCorruptedOmemoKeyException
- if the key is damaged or malformedpublic byte[] preKeyToBytes(org.whispersystems.libsignal.state.PreKeyRecord preKeyRecord)
OmemoKeyUtil
preKeyToBytes
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
preKeyRecord
- preKeypublic org.whispersystems.libsignal.state.PreKeyRecord preKeyFromBytes(byte[] bytes) throws IOException
OmemoKeyUtil
preKeyFromBytes
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
bytes
- byte arrayIOException
- when something goes wrongpublic org.whispersystems.libsignal.state.PreKeyBundle bundleFromOmemoBundle(OmemoBundleVAxolotlElement bundle, OmemoDevice contact, int preKeyId) throws CorruptedOmemoKeyException
OmemoKeyUtil
bundleFromOmemoBundle
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
bundle
- OmemoBundleElementcontact
- Contact that the bundle belongs topreKeyId
- id of the preKey that will be selected from the OmemoBundleElement and that the PreKeyBundle will containCorruptedOmemoKeyException
- if some key is damaged or malformedpublic byte[] signedPreKeySignatureFromKey(org.whispersystems.libsignal.state.SignedPreKeyRecord signedPreKey)
OmemoKeyUtil
signedPreKeySignatureFromKey
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
signedPreKey
- signedPreKeypublic int signedPreKeyIdFromKey(org.whispersystems.libsignal.state.SignedPreKeyRecord signedPreKey)
OmemoKeyUtil
signedPreKeyIdFromKey
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
signedPreKey
- keypublic byte[] identityKeyPairToBytes(org.whispersystems.libsignal.IdentityKeyPair identityKeyPair)
OmemoKeyUtil
identityKeyPairToBytes
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
identityKeyPair
- identityKeyPairpublic org.whispersystems.libsignal.IdentityKey identityKeyFromPair(org.whispersystems.libsignal.IdentityKeyPair identityKeyPair)
OmemoKeyUtil
identityKeyFromPair
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
identityKeyPair
- keyPairpublic byte[] identityKeyForBundle(org.whispersystems.libsignal.IdentityKey identityKey)
OmemoKeyUtil
identityKeyForBundle
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
identityKey
- identityKey that will be transportedpublic byte[] identityKeyToBytes(org.whispersystems.libsignal.IdentityKey identityKey)
OmemoKeyUtil
identityKeyToBytes
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
identityKey
- idKeypublic byte[] preKeyPublicKeyForBundle(org.whispersystems.libsignal.ecc.ECPublicKey preKey)
OmemoKeyUtil
preKeyPublicKeyForBundle
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
preKey
- keypublic byte[] preKeyForBundle(org.whispersystems.libsignal.state.PreKeyRecord preKeyRecord)
OmemoKeyUtil
preKeyForBundle
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
preKeyRecord
- preKeypublic byte[] signedPreKeyPublicForBundle(org.whispersystems.libsignal.state.SignedPreKeyRecord signedPreKey)
OmemoKeyUtil
signedPreKeyPublicForBundle
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
signedPreKey
- signedPrekeypublic OmemoFingerprint getFingerprint(org.whispersystems.libsignal.IdentityKey identityKey)
OmemoKeyUtil
getFingerprint
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
identityKey
- identityKeypublic org.whispersystems.libsignal.SignalProtocolAddress omemoDeviceAsAddress(OmemoDevice contact)
OmemoKeyUtil
omemoDeviceAsAddress
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
contact
- omemoContactpublic OmemoDevice addressAsOmemoDevice(org.whispersystems.libsignal.SignalProtocolAddress address) throws XmppStringprepException
OmemoKeyUtil
addressAsOmemoDevice
in class OmemoKeyUtil<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey,org.whispersystems.libsignal.state.PreKeyRecord,org.whispersystems.libsignal.state.SignedPreKeyRecord,org.whispersystems.libsignal.state.SessionRecord,org.whispersystems.libsignal.SignalProtocolAddress,org.whispersystems.libsignal.ecc.ECPublicKey,org.whispersystems.libsignal.state.PreKeyBundle,org.whispersystems.libsignal.SessionCipher>
address
- contactXmppStringprepException
- if the address is not a valid BareJid