3

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.

And_dev
  • 179
  • 1
  • 5
  • 16
  • 2
    Why do you need to do this? Remember that typically, you don't gain any security this way. Also, try and show some research effort in your question. – Lily Chung Oct 21 '12 at 03:16
  • Yes i'm trying to protect the resource files. Then how can i achieve this? Thats what i'm trying to find – And_dev Oct 21 '12 at 03:25
  • Take a look at these questions: http://stackoverflow.com/questions/4275311/how-to-encrypt-and-decrypt-file-in-android – Victor Ronin Oct 21 '12 at 14:48

1 Answers1

4

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.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • 3
    yes i know that but how can we avoid easy access like simply unzipping the apk to view the resources in the app. – And_dev Oct 22 '12 at 12:27
  • I have 1 more questions other than this one i will raise this separately 1) How to create app using ARM instruction for android like media player etc? Please guide me in this where to start any tutorials – And_dev Oct 22 '12 at 12:29