Originally posted by sachin kataria:
i have to encrypt and decrypt the xml file...
so, first i generate public and private key using RSA algo.
after that for xml file encryption, i initialize cipher with DESeds algo..
that is giving me exception..
and i think the code which is in link ("found here") wont work for xml file encryption, it is use for simple data encryption
To use a triple DES cipher (DESede), you need a triple DES secret key. To use a RSA cipher, you need a RSA public and/or private key.
These are two different algorithms, you can't generate a key for one and use it in the other. Not only don't I think the keys are the same size, there may also be safety checks to prevent you from accidentally doing so.
Henry