encrypt method

  1. @override
Future<String?> encrypt({
  1. required String passPhrase,
  2. required String contentToEncrypt,
})
override

Implementation

@override
Future<String?> encrypt({required String passPhrase, required String contentToEncrypt}) async {
  try {
    final result = await js.context.callMethod('aesService.encryptWithRandomSaltAndIv', [passPhrase, contentToEncrypt]);
    return result;
  } catch (e) {
    log(e.toString());
    return null;
  }
}