Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in encryption of encrypted xml file....

 
sachin kataria
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i have one encrypted xml file which is encrypted using public key...
now i want to add some data in that encrypted xml file..
and again i want to encrypt that using another public key...

so, can anybody tell me how i can add text in encrypted xml file....
so, i can again encrypt that using public key..
pls, help me......
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That can be done in three steps: decrypt the XML file, append to the file using your favorite XMl API, encrypt the file. But this seems too obvious, so I think I'm missing something in your question. Are you possibly asking whether you can add to the file without decrypting it? That would be impossible.
 
Ashish Chopra
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
let me answer in steps..

i have one encrypted xml file which is encrypted using public key...
now i want to add some data in that encrypted xml file..


To add any data in an encrypted file, you need to decrypt it first. Now as you are talking of encryption with a public key, you need to have the private key for decryption.
and again i want to encrypt that using another public key...

Once you have decrypted the file, edit it, add the data and then encrypt it using your public key

Hope this helps!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic