requestEncryption static method

Future<Map<String, dynamic>> requestEncryption({
  1. required Map<String, dynamic> request,
})

Implementation

static Future<Map<String, dynamic>> requestEncryption(
    {required Map<String, dynamic> request}) async {
  final String rsaEncryptedDeviceId =
      await toEncryptRSA(rawText: KeyesConfiguration.deviceId!);
  final String payload = toEncryptAES(
      rawText: jsonEncode(request), key: KeyesConfiguration.deviceId!);
  return {'encryptedPayload': payload, 'encryptedKey': rsaEncryptedDeviceId};
}