如何使用Qt加密/解密文件内容?

发布于 2024-09-28 06:17:53 字数 353 浏览 1 评论 0原文

这个问题以前已经被其他人问过很多次了,但不知何故,答案让我更加困惑。

在我的 Qt 应用程序(适用于 symbian 设备)中,我有一个包含用户详细信息(电子邮件 ID n 密码)的文件,我将其存储在目标设备中,因此希望对文件中的此数据进行加密以确保其安全。我不需要超级安全的加密技术,任何中等的加密技术都可以。我如何使用 Qt 来做到这一点?

我下载了 QCA 并尝试安装,但在验证 Qt 4 构建环境时失败。原因:无法找到 Qt 4 的 qmake 工具。(我已将 QTDIR 设置为已安装的 qt 路径)

有人可以指导我正确的安装步骤吗、QCA 的示例或替代方案? (或者甚至 Symbian 加密 API 也可以)

谢谢

This question has been asked many times before by others, but somehow the answers made me more confused.

In my Qt application (for symbian devices), I have a file with user details (Email ids n passwords) which I store in target device, so want to encrypt this data in the file to keep it secure. I don't need a super secure encryption techniques, just any moderate one would do. How can I do this using Qt?

I downloaded QCA and tried installing but it failed on Verifying Qt 4 build env.. Reason:Unable to find the qmake tool for Qt 4. (I've set the QTDIR to the installed qt path)

Can someone direct me to proper installation steps, examples or alternatives to QCA? (or may be even Symbian encryption APIs would do)

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

琉璃梦幻 2024-10-05 06:17:53

您还可以使用操作系统提供的数据笼并将文件存储在应用程序的私有目录中。您可以使用QApplication::applicationDirPath()获取其位置。

对于 Qt 应用程序中的加密,我通常使用普通的旧版 openssl C 库。它也可在 Symbian 设备上使用。

You can also use the data caging provided by the operating system and store your files in the application's private directory. You can get its location with QApplication::applicationDirPath().

For encryption in Qt apps I usually use the plain old openssl C library. It's also available on Symbian devices.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文