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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
acknowledgeLicense()
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>
createDefaultOmemoStoreBackend()
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 Detail
-
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
public static void setup()
-
createDefaultOmemoStoreBackend
public 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> createDefaultOmemoStoreBackend()
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
public static void 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.
-
-