📁 FileCryptor is for encryption and decryption files. (PDF, MP3, MP4, PNG, ...)
Add to your pubspec.yaml
:
dependencies:
file_cryptor: <last_version>
void main() async {
FileCryptor fileCryptor = FileCryptor(
key: "Your 32 bit key.................",
iv: 16,
dir: "example",
);
File encryptedFile = await fileCryptor.encrypt(inputFile: "video.mp4", outputFile: "video.aes");
print(encryptedFile.absolute);
File decryptedFile = await fileCryptor.decrypt(inputFile: "video.aes", outputFile: "video.mp4");
print(decryptedFile.absolute);
}
File: '<your_platform_path>\example\video.aes'
File: '<your_platform_path>\example\video.mp4'