Reputation: 2852
I have an XML file which I want to store on the users machine. I want this file to be encrypted, so that the user won't use/understand the data. When required, this encrypted file will get decrypted and the front-end will read it and use the data. For front-end and Encryption/Decryption I will be using Java.
I need some suggestion on how to do this. Greenhorn in cryptography.
What can be the best approach?
Upvotes: 0
Views: 543
Reputation: 5666
Encryption is very, very easy to do wrong. Wrong in case of encryption means that making a single mistake can break your whole encryption scheme.
When thinking about employing encryption, it's almost always (except in cases of professional security developers) a good idea to use the solutions the provider of your framework did for you. Java offers the cryptography extensions which you can start with here. There are some good examples for using it here.
Upvotes: 3
Reputation: 523
You could use a base64 encoder/decoder if you want just to prevent viewing or/and editing your XML files directly.
It's not the best possible solution concerning security, but it would work if you want something easy and quick.
Upvotes: 0