As I understand it, there is encryption built in to Android, accessible via javax.crypto.Cipher. (Note that I've never actually used it, but have used similar interfaces on other phones.) You should use this (assuming it really works), vs, eg, downloading source from the internet and building it into your product, since doing the latter can run you afoul of some ugly tech export laws.
If you encrypt the entire XML file you won't be able to use Android's "compiled' XML access tools, and you'll expose the unencrypted file on the phone. If you encrypt individual entries then you have a complicated build process and, due to the shorter elements being encrypted, a more complicated decryption process and (technically) less secure encryption. (Note that if you encrypt individual entries you should encode them with "base 64" encoding or something similar, so that XML doesn't choke on the non-ASCII characters.) On Oct 5, 7:41 am, bagelboy <[email protected]> wrote: > Hello Developers, > > One of my apps uses custom xml files for much of the data used by the > app, I'd like to encrypt the data as part of a copy protection plan > and I would like some views about how best to go about it. I realize > that this isn't going to solve all my copy protection problems but it > will certainly make the pirates' job harder. > > There are two methods I can see: I can encrypt the whole file and > decrypt it during the activity setup or I can encrypt the data in the > xml entries. I would think that encrypting the whole file and not just > parts of it is the way to go but I would like some opinions on that. > > - Is there a lightweight encryption library you would recommend I use? > > - What is the fastest and lightest way to access the encrypted data? > > thanks, > BB -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

