getEncryptModel static method

Future<Map<String, dynamic>> getEncryptModel({
  1. required String encryptedKey,
  2. required String encryptedPayload,
})

Implementation

static Future<Map<String, dynamic>> getEncryptModel(
    {required String encryptedKey, required String encryptedPayload}) async {
  final String aesKey =
      await M2PEncryptAndDecrypt.toDecryptRSA(encryptedText: encryptedKey);
  final String aesDecryptedString = M2PEncryptAndDecrypt.toDecryptAES(
      encryptedText: encryptedPayload, aesKey: aesKey);
  return json.decode(aesDecryptedString) as Map<String, dynamic>;
}