encryptStringWithRsa static method

Uint8List encryptStringWithRsa(
  1. String data,
  2. RSAPublicKey key
)

Encrypts the given data with RSA using the specified key.

Implementation

static Uint8List encryptStringWithRsa(String data, RSAPublicKey key) {
  return encryptBytesWithRsa(Uint8List.fromList(utf8.encode(data)), key);
}