encryptData method

Uint8List encryptData(
  1. Uint8List message
)

Encrypt a message which can only be decrypted using the associated RSAPrivateKey

Implementation

Uint8List encryptData(Uint8List message) {
  final cipher = pointy.PKCS1Encoding(pointy.RSAEngine());
  cipher.init(
      true, pointy.PublicKeyParameter<pointy.RSAPublicKey>(_publicKey));
  return cipher.process(message);
}