pub async fn message_encrypt<R: Rng + CryptoRng>(
ptext: &[u8],
remote_address: &ProtocolAddress,
local_address: &ProtocolAddress,
session_store: &mut dyn SessionStore,
identity_store: &mut dyn IdentityKeyStore,
now: SystemTime,
csprng: &mut R,
) -> Result<CiphertextMessage>Expand description
Encrypt ptext for remote_address, loading and storing session state.
If the session is unacknowledged (a locally-initiated session that has not
yet received a response), wraps the SignalMessage in a
PreKeySignalMessage containing the original pre-key material.