Class SignalOmemoService
java.lang.Object
org.jivesoftware.smackx.omemo.OmemoService<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>
org.jivesoftware.smackx.omemo.signal.SignalOmemoService
- All Implemented Interfaces:
OmemoCarbonCopyStanzaReceivedListener
,OmemoMessageStanzaReceivedListener
public final class SignalOmemoService
extends OmemoService<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>
Concrete implementation of the OmemoService using the Signal library.
-
Field Summary
Fields inherited from class org.jivesoftware.smackx.omemo.OmemoService
LOGGER
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
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> Create a default OmemoStore object.protected SignalOmemoRatchet
instantiateOmemoRatchet
(OmemoManager manager, 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> store) Return a new instance of the OMEMO ratchet.protected void
processBundle
(OmemoManager omemoManager, org.whispersystems.libsignal.state.PreKeyBundle contactsBundle, OmemoDevice contactsDevice) Process a received bundle.static void
setup()
Methods inherited from class org.jivesoftware.smackx.omemo.OmemoService
getInstance, getOmemoRatchet, getOmemoStoreBackend, isServiceRegistered, onOmemoCarbonCopyReceived, onOmemoMessageStanzaReceived, purgeDeviceList, setInstance, setOmemoStoreBackend
-
Method Details
-
instantiateOmemoRatchet
protected SignalOmemoRatchet instantiateOmemoRatchet(OmemoManager manager, 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> store) Description copied from class:OmemoService
Return a new instance of the OMEMO ratchet. The ratchet is internally used to encrypt/decrypt message keys.- Specified by:
instantiateOmemoRatchet
in classOmemoService<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> - Parameters:
manager
- OmemoManagerstore
- OmemoStore- Returns:
- instance of the OmemoRatchet
-
setup
-
createDefaultOmemoStoreBackend
public OmemoStore<org.whispersystems.libsignal.IdentityKeyPair,org.whispersystems.libsignal.IdentityKey, createDefaultOmemoStoreBackend()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> Description copied from class:OmemoService
Create a default OmemoStore object.- Specified by:
createDefaultOmemoStoreBackend
in classOmemoService<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> - Returns:
- default omemoStore.
-
acknowledgeLicense
-
processBundle
protected void processBundle(OmemoManager omemoManager, org.whispersystems.libsignal.state.PreKeyBundle contactsBundle, OmemoDevice contactsDevice) throws CorruptedOmemoKeyException Description copied from class:OmemoService
Process a received bundle. Typically, that includes saving keys and building a session.- Specified by:
processBundle
in classOmemoService<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> - Parameters:
omemoManager
- our OmemoManagercontactsBundle
- bundle of the contactcontactsDevice
- OmemoDevice of the contact- Throws:
CorruptedOmemoKeyException
- if the OMEMO key is corrupted.
-