encrypting the xml file using asymmetric cipher
i have to encrypt the xml file using asymmetric cyper....
in one class , i am generating private key and public key using "RSA" algorithm..using 1024 byte initialization...
it is generating properly...
and after that in second class i am encrypting the xml file using "DESede" algorithm and i am using public key of above class..
but i am getting exceptione :
java.security.InvalidKeyException: Invalid key length: 162 bytes
at com.sun.crypto.provider.DESedeCipher.engineGetKeyS ize(DashoA6275)
at javax.crypto.Cipher.init(DashoA6275)
at XmlEncryption.getEncryptedData(XmlEncryption.java: 147)
at XmlEncryption.encryptCompleteXmlFile(XmlEncryption .java:123)
at demoXmlEncApp.simulateBookSellersEnd(demoXmlEncApp .java:72)
at demoXmlEncApp.main(demoXmlEncApp.java:29)
so, what is that ?
i want to use RSA algo for key generatiion and DESede for cipher initialization .
is there any site for where source code of xml file encryption using asymmetric cipher is available?
pls, help me.....
|