createSecureMessage abstract method

SecureMessage createSecureMessage(
  1. InstantMessage iMsg,
  2. Uint8List ciphertext,
  3. Map<ID, EncryptedBundle>? keyBundles
)

Creates a secure message from instant message, adding 'data' and 'keys'.

Encrypts the plaintext content with a symmetric key, then encrypts the key for each receiver terminal, forming the encrypted data and key bundles.

iMsg is the plain instant message. ciphertext is the encrypted data of the content. keyBundles is the encrypted key bundles for the receiver terminals.

Returns a new SecureMessage instance.

Implementation

SecureMessage createSecureMessage(InstantMessage iMsg, Uint8List ciphertext, Map<ID, EncryptedBundle>? keyBundles);