Android:如何加密和解密资源文件并在App中使用 [英] Android: How to Encrypt and Decrypt a resource file and use in 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屋!