如何将 SQLite DB(*.db 文件)嵌入到 AIR 应用程序中?
我想将 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,你不能。即使您可以打包它,数据也不会真正受到保护:因为 .air 包本质上只不过是增强的 .zip 存档,任何人都可以从 .air 文件中提取数据库。
您所要做的就是加密您的数据库并使用密码保护它,以便只有授权用户才能访问该数据库。
有足够的文档说明如何执行此操作。以下是 Adobe 提供的入门教程: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
我认为这是不可能的。如果将其嵌入到air文件中并安装AIR应用程序,则数据库将被复制到安装文件夹中。
您可以在用户存储位置创建数据库,
用户仍然可以在资源管理器中导航到该文件。它将存储在 /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
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.