encryptMapValue method

  1. @override
FutureOr<Map<String, dynamic>> encryptMapValue({
  1. required Map<String, dynamic> data,
  2. String moduleKey = defaultModuleKey,
  3. List<String> skipForKey = const [],
})
override

Implementation

@override
FutureOr<Map<String, dynamic>> encryptMapValue({required Map<String, dynamic> data, String moduleKey = defaultModuleKey, List<String> skipForKey = const []}) async {
  //Info to pass into isolate
  if(!module.containsKey(moduleKey)){
    throw NUICryptoException(cause: NUICryptoError.KEY_NOT_FOUND);
  }

  try{
    return await _doMapEncryption(data, module[moduleKey]!, skipForKey);
  }on Exception catch(e){
    logNUI("NUICryptography in Flutter Isolate", "Encryption Exception ${e.toString()}");
    rethrow;
  }
}