首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Flutter:应用程序在加密时卡住

Flutter:应用程序在加密时卡住
EN

Stack Overflow用户
提问于 2020-10-15 21:45:11
回答 2查看 92关注 0票数 0

我有一个问题加密和解密我的视频文件和它加密视频文件。没有任何错误。但它在加密和解密视频文件时表现不佳。我使用异步方法。但它仍然令人难受。下面是我的代码。

加密:

代码语言:javascript
运行
复制
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;
    }
  }

解密:

代码语言:javascript
运行
复制
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;
    }
  }

谢谢。

EN

Stack Overflow用户

回答已采纳

发布于 2020-10-20 10:29:14

对于来到这里的其他用户,关于同一主题的答案在这里Flutter: run multiple methods

票数 1
EN
查看全部 2 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64372964

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档