decrypt

open suspend override fun decrypt(session: SecureSession, message: CiphertextMessage, localIdentityKey: ByteArray): DecryptionResult

Decrypts message on an existing session of the device whose public identity key is localIdentityKey. A PreKeyMessage is accepted too; the initiator may send several before it sees a reply. It must have the session's initiation version, belong to the initiation that created session (see sessionInfo), and the local device must be the session's responder with the message's identity key as initiator; otherwise ProtocolException.InvalidMessage is thrown.