我有一个问题加密和解密我的视频文件和它加密视频文件。没有任何错误。但它在加密和解密视频文件时表现不佳。我使用异步方法。但它仍然令人难受。下面是我的代码。
加密:
Future sifrele() async {
try {
crypt.setOverwriteMode(AesCryptOwMode.on);
encFilepath = await crypt.encryptFile(realPath + '/WhatCarCanYouGetForAGrand.mp4', realPath + '/video.mp4.aes');
print('The encryption has been completed successfully.');
} on AesCryptException catch (e) {
if (e.type == AesCryptExceptionType.destFileExists) {
print('The encryption has been completed unsuccessfully.');
}
return;
}
}解密:
Future decrypting() async {
var videos = File(realPath + "/ElephantsDream.mp4.aes");
try {
realPath = await crypt.decryptFile(realPath + '/video.mp4.aes', realPath + '/cozulen.mp4');
print('The decryption has been completed successfully.');
} on AesCryptException catch (e) {
if (e.type == AesCryptExceptionType.destFileExists) {
print('The decryption has been completed unsuccessfully.');
}
return;
}
}谢谢。
发布于 2020-10-20 10:29:14
对于来到这里的其他用户,关于同一主题的答案在这里Flutter: run multiple methods
https://stackoverflow.com/questions/64372964
复制相似问题