encryptDataToFileSync method
Encrypts binary data srcData
to destFilePath
file synchronously.
Returns String object containing the path to encrypted file.
Implementation
String encryptDataToFileSync(Uint8List srcData, String destFilePath) {
destFilePath = destFilePath.trim();
AesCryptArgumentError.checkNullOrEmpty(_password, 'Empty password.');
AesCryptArgumentError.checkNullOrEmpty(
destFilePath, 'Empty encrypted file path.');
return _Cryptor.init(_passBytes, _owMode, _userdata)
.encryptDataToFileSync(srcData, destFilePath);
}