Titanium:Android设备上的数据加解密技术

发布于 2025-01-08 12:45:31 字数 493 浏览 3 评论 0原文

我使用的是钛金1.7.6 我正在开发一个 android 2.2 应用程序,它将从 SD 卡的资源文件夹中访问图像/视频/pdf/文本。我希望只有应用程序能够读取我的资源文件夹的内容。最好的方法是什么? 以下是我的一些想法:

  1. 密码保护资源文件夹,只有应用程序知道密码。(不确定这是否可以完成。如果您知道如何做,请告诉我。)
  2. <强>加密资源文件夹内的所有文件。(在这种方法中,我猜测为了读取图像等加密文件,我必须解密该文件并将其存储到某个临时文件夹中。使用后解密的文件从临时文件夹中删除该文件。)但是有一个这种方法有问题。请参阅此处问题的链接

如果您有其他想法,请将其添加到列表中。

I am using Titanium 1.7.6
I am developing an android 2.2 application that will access images/videos/pdf/text from my resources folder from sd card. I want only the application to be able to read the contents of my resources folder. What would be the best way to do that?
Here are some of my ideas:

  1. password protect the resources folder, only application would know the password. (Not sure if this can be done. If you know how to do it please let me know.)
  2. encrypt all the files inside the resources folder. (in this approach, I am guessing in order to read an encrypted file like images, I will have to decrypt the file and store it into some temp folder. after using the decrypted file delete the file from the temp folder.) But there is a problem with this approach. please see link to the problem here

If you have some other idea please add that to the list.

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

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

发布评论

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

评论(1

晒暮凉 2025-01-15 12:45:31

我在 Android 开发方面并没有真正的经验,但这里有一些来自我脑海中的想法,可能会派上用场:

  • 您始终可以使用开源压缩库,例如 gZip 使用 等附加库来压缩和密码保护您的文件夹PGPPKZIP。这种方法在开发人员中确实很常见。例如:使命召唤游戏。游戏将精灵/声音/模型/脚本等资源存储在扩展名为 .ff 的压缩和加密文件夹中。
  • 由于 Android 使用与 Linux 相同的代码库,我认为可以以相同的方式加密文件夹。所以尝试 Linux 中的所有加密技术
  • 当然,当谈到加密区域时,人们不会简单地忘记像加密/解密算法这样的 RSA 和 SSL

而上述方法中的最佳选择是第一个,因为

  1. :压缩整个文件夹,您无需担心其中的文件
  2. 在使用 gZip 等库时,除了为您的应用程序提供强大、快速和优化的主干之外,您还拥有丰富且易于使用的 API 来解密和压缩解压你的文件并文件夹。

希望对您有帮助。

I don't really have a serious experience with android developing, but here are some ideas from top of my mind which may come handy:

  • You can always use open-source compressing libraries such as gZip to compress and password protecting your folders using an additional library like PGP or PKZIP. this method is really common among developers. e.g: Call Of Duty games. the game, stores resources such as sprites/sounds/models/scripts and such in compressed and encrypted folders with .ff extension.
  • since Android uses the same code base with Linux, I think it's possible to encrypt folders in the same fashion. so try all of those encrypting techniques from Linux
  • And of course, when it comes to encrypting areas, one does not simply forgets about RSA and SSL like encryption/decryption algorithms

And your best option from the above methods is the first one, because:

  1. By compressing a whole folder, you don't need to worry about files inside it
  2. While using libraries such as gZip, with addition to a robust,fast and optimized backbone for your application you have a rich and easy-to-use API to decrypt and decompress your files and folders.

Hope it helps you.

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