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 String? response = await methodChannel.invokeMethod('encrypt', {
      "passPhrase": passPhrase,
      "contentToEncrypt": contentToEncrypt,
    });
    log("Received encrypted value - $response");
    return response; // Response from native
  } catch (e) {
    log("Error on encrypt: $e");
    return null;
  }
}