wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes Encrypting XML file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Encrypting XML file" Watch "Encrypting XML file" New topic
Author

Encrypting XML file

Sandy Yohan
Greenhorn

Joined: Jan 09, 2012
Posts: 4

Hello friends,

I am new to this forum and have joined to gain knowledge from the industry experts.

I am working on a Swing based application where the database is in xml file. Now, since there is a possibility that the end-user may edit the xml file, i want to encrypt it in such a way that the user should not edit it.
So is there a way by which I can achieve this?

I am waiting for the help.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
That's what XML Security is for: http://santuario.apache.org/
Sandy Yohan
Greenhorn

Joined: Jan 09, 2012
Posts: 4

Thank you for your reply Tim.
Can you please help with an example how i can achieve this?
I want the encrypted xml files to be read only through Java code.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Santuario comes with example code. It is generally under-documented, so some reseach on XML-Encryption in general may help you get started with the samples.
Sandy Yohan
Greenhorn

Joined: Jan 09, 2012
Posts: 4

Yes, even I think that my research was not adequate on this subject.
Tim, I am encouraged to ask you, only if you don't mind, have you worked on XML encryption? I believe you have a lot more to share on this topic.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
I think you'll learn more if you read up on the subject some more, try to get some sample code running, and then come back here with questions. I'm not really motivated to write an article about it
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Encrypting XML file