public class SignalOmemoSession extends 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>
cipher, identityKey, omemoManager, omemoStore, preKeyId, remoteDevice
Modifier and Type | Method and Description |
---|---|
org.whispersystems.libsignal.SessionCipher |
createCipher(OmemoDevice contact)
Create a new SessionCipher used to encrypt/decrypt keys.
|
byte[] |
decryptMessageKey(byte[] encryptedKey)
Decrypt a messageKey using our sessionCipher.
|
CiphertextTuple |
encryptMessageKey(byte[] messageKey)
Encrypt a message key for the recipient.
|
decryptMessageElement, decryptMessageElement, decryptTransportedKey, getFingerprint, getIdentityKey, getPreKeyId, setIdentityKey
public org.whispersystems.libsignal.SessionCipher createCipher(OmemoDevice contact)
OmemoSession
createCipher
in class 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>
contact
- OmemoDevicepublic CiphertextTuple encryptMessageKey(byte[] messageKey)
OmemoSession
encryptMessageKey
in class 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>
messageKey
- serialized key to encryptpublic byte[] decryptMessageKey(byte[] encryptedKey) throws NoRawSessionException
OmemoSession
decryptMessageKey
in class 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>
encryptedKey
- encrypted keyNoRawSessionException
- when no session was found in the double ratchet library