decryptDataFromFile method

Future<Uint8List> decryptDataFromFile(
  1. String srcFilePath
)

Decrypts binary data from srcFilePath file asynchronously.

Returns Future<Uint8List> that completes with decrypted data once the entire operation has completed.

Implementation

Future<Uint8List> decryptDataFromFile(String srcFilePath) async {
  srcFilePath = srcFilePath.trim();
  AesCryptArgumentError.checkNullOrEmpty(_password, 'Empty password.');
  AesCryptArgumentError.checkNullOrEmpty(
      srcFilePath, 'Empty source file path.');
  return await _Cryptor.init(_passBytes, _owMode, _userdata)
      .decryptDataFromFile(srcFilePath);
}