Skip to main content

receiveMessage method

[Future<[void>]] receiveMessage(

  1. [[Map[<[String], dynamic>]] message, ]
  2. [[HiveInterface] hive]

)

Helper function to decrypt the message.

Internally uses the loadKeyPair function to get private key and assymetricDecryptString to decrypt the given message.

params:

  • message: Message object containing a field named encryptedMessage which is supposed to contained user's message in encrypted format.
  • hive: The HiveInterface to store things in.

returns: None

Implementation

Future<void> receiveMessage(
Map<String, dynamic> message,
HiveInterface hive,
) async
  1. talawa
  2. encryptor
  3. Encryptor
  4. receiveMessage method
Encryptor class