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 message (with envelope and content). ciphertext is the encrypted data of the content. keyBundles is the encrypted key bundles (terminal → encrypted key data).

Returns a SecureMessage instance.

Implementation

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