pgpEncrypt function

Future<String> pgpEncrypt({
  1. required String plainText,
  2. required List<String> keys,
})

Implementation

Future<String> pgpEncrypt({
  required String plainText,
  required List<String> keys,
}) async {
  final combinedPGPKey = keys.join();

  final encrypted = await OpenPGP.encrypt(
    plainText,
    combinedPGPKey,
  );
  return encrypted;
}