Android:如何加密和解密资源文件并在App中使用 [英] Android: How to Encrypt and Decrypt a resource file and use in App

查看:230
本文介绍了Android:如何加密和解密资源文件并在App中使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要存储资源文件(文本文档,imgaes,音乐等)在我的加密格式的应用程序,并在运行时我需要解密的文件和使用它。提前致谢。

解决方案

然后我怎样才能实现这一点?




如果你不希望用户能够访问的数据,请不要将其存储在用户的手机上。



足够感兴趣的用户可以访问其设备上的任何内容。这将包括您的代码以及您的资源。您使用的任何加密算法和密钥将在您的代码中;发现并使用它来解密您的资源并不是特别困难。


I need to store resource files(text doc,imgaes,music etc) in my app in encrypted format and in runtime i need to decrypt the files and use it. Thanks in advance.

解决方案

Then how can i achieve this?

If you do not want the user to have access to the data, do not store it on the user's phone.

A sufficiently interested user can access anything on their device. This would include your code along with your resources. Any encryption algorithm and key that you use will be in your code; finding that and using that to decrypt your resources is not especially difficult.

这篇关于Android:如何加密和解密资源文件并在App中使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆