rsaEncrypt static method
Encrypt the given message using the given RSA publicKey.
Implementation
static String rsaEncrypt(String message, RSAPublicKey publicKey) {
var cipher = RSAEngine()
..init(true, PublicKeyParameter<RSAPublicKey>(publicKey));
var cipherText = cipher.process(Uint8List.fromList(message.codeUnits));
return String.fromCharCodes(cipherText);
}