0

My android application is configurable using an external XML file present in the SD Card. The changes in the configuration requires a new XML file to be copied in that location. This XML file needs to be encrypted. So if the user request a new config for the app, the steps would be:

  1. New XML file is generated for desired configuration.
  2. File is encrypted using some standard encryption utility.
  3. The file is sent to client/user.
  4. Client copies the file to SD Card, and starts my app.
  5. My application opens the file, decrypt it, read the content and delete the file.

I need help in step 2 and 5. Which standard tool I can use to encrypt my XML file (Should use some standard encryption algo) and secondly how the file can be decrypted in my android app. I am looking into java crypto package.

nayan
  • 181
  • 2
  • 8

1 Answers1

0

You can use this:

Android encryption

Beware as you should salt your encryption key with something not stored on the app (coming from a server for example) so that by reverting the APK to code you couldn't read the file anyway.

Community
  • 1
  • 1
neteinstein
  • 17,529
  • 11
  • 93
  • 123
  • I had seen this post. And the answer does not handle step 2 above. Do we have any command line utility etc through which we can encrypt the file and can decrypt back in my android app. – nayan Dec 21 '11 at 17:25
  • You can simply make a java class that you can invoke with the argument being your file... – neteinstein Dec 21 '11 at 17:30