如何将 SQLite DB(*.db 文件)嵌入到 AIR 应用程序中?

发布于 2024-12-27 03:17:06 字数 78 浏览 1 评论 0原文

我想将 SQLite 数据库(*.db 文件)嵌入到 AIR 应用程序中,例如图像、mp3 等。 这是为了确保无法为其他用户复制我的数据库。

I want to emded SQLite database (*.db file) to the AIR app, like images, mp3 etc.
This is to ensure that it was impossible to copy my database for other users.

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

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

发布评论

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

评论(2

一刻暧昧 2025-01-03 03:17:06

不,你不能。即使您可以打包它,数据也不会真正受到保护:因为 .air 包本质上只不过是增强的 .zip 存档,任何人都可以从 .air 文件中提取数据库。

您所要做的就是加密您的数据库并使用密码保护它,以便只有授权用户才能访问该数据库。

有足够的文档说明如何执行此操作。以下是 Adob​​e 提供的入门教程:http://www .adobe.com/devnet/air/flex/quickstart/articles/encrypted_database.html

No, you can't. And even if you could package it, the data wouldn't really be protected: since an .air package is in essence nothing more than an enhanced .zip archive, anyone could just extract the database from the .air file.

What you have to do is encrypt your database and protect it with a password so that only authorized users can access the database.

There's ample documentation on how to do this. Here's a tutorial from Adobe to get you started: http://www.adobe.com/devnet/air/flex/quickstart/articles/encrypted_database.html

七七 2025-01-03 03:17:06

我认为这是不可能的。如果将其嵌入到air文件中并安装AIR应用程序,则数据库将被复制到安装文件夹中。

您可以在用户存储位置创建数据库,

var file:File = File.applicationStorageDirectory.resolvePath("name.db"); 

用户仍然可以在资源管理器中导航到该文件。它将存储在 /users/username/appdata/appname/Local Store 下

AppData 是一个隐藏文件夹。

I think this is not possible. If you embed it to the air file andinstall the AIR app the db will be copied to the installation folder.

You could create the database in the user storage location

var file:File = File.applicationStorageDirectory.resolvePath("name.db"); 

Users could still navigate in explorer to the file. It will be stored under /users/username/appdata/appname/Local Store

AppData is a hidden folder.

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