toEncryptRSA static method

Future<String> toEncryptRSA({
  1. required String rawText,
})

Implementation

static Future<String> toEncryptRSA({required String rawText}) async {
  String rsaEncryptedString = '';
  try {
    rsaEncryptedString =
        await RSA.encryptPKCS1v15(rawText, KeyesConfiguration.rsaPublic!);
    debugPrint(rsaEncryptedString);
  } catch (e) {
    debugPrint('encryptRSA--> Exception');
    rethrow;
  }

  return rsaEncryptedString;
}