Sorry, I forgot the error produced in JDK 1.5 Original Exception was java.security.InvalidKeyException: Wrong algorithm: DESede or TripleDES required at org.apache.xml.security.encryption.XMLCipher.decryptToByteArray(Unknown Source) at org.apache.xml.security.encryption.XMLCipher.decryptElement(Unknown Source) at org.apache.xml.security.encryption.XMLCipher.doFinal(Unknown Source) at com.capeclear.pgh.stuff.SecurityKeyTests.main(SecurityKeyTests.java:98) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90) java.security.InvalidKeyException: Wrong algorithm: DESede or TripleDES required at com.sun.crypto.provider.SunJCE_aa.a(DashoA12275) at com.sun.crypto.provider.SunJCE_m.a(DashoA12275) at com.sun.crypto.provider.SunJCE_h.a(DashoA12275) at com.sun.crypto.provider.DESedeCipher.engineInit(DashoA12275) at javax.crypto.Cipher.init(DashoA12275) at javax.crypto.Cipher.init(DashoA12275) at org.apache.xml.security.encryption.XMLCipher.decryptToByteArray(Unknown Source) at org.apache.xml.security.encryption.XMLCipher.decryptElement(Unknown Source) at org.apache.xml.security.encryption.XMLCipher.doFinal(Unknown Source) at com.capeclear.pgh.stuff.SecurityKeyTests.main(SecurityKeyTests.java:98) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90) Pete Peter Hendry wrote: The class attached contains test code that works Ok under JDK 1.4 but has never worked under 1.5. The scenario is where the secret key is to be included with the message and encrypted using a public key then decrypted by the recipient using their private key. When the key is decrypted an instance of SecretKeySpec is returned with its algorithm set to RSA (the original key is DESEde). This happens on both 1.4 and 1.5 but it only fails to decrypt the data in 1.5. |
- Issue moving from JDK 1.4 to 1.5 Peter Hendry
- Re: Issue moving from JDK 1.4 to 1.5 Peter Hendry
- Re: Issue moving from JDK 1.4 to 1.5 Vishal Mahajan
- Re: Issue moving from JDK 1.4 to 1.5 Peter Hendry
- Re: Issue moving from JDK 1.4 to 1.5 Vishal Mahajan
- Re: Issue moving from JDK 1.4 to 1.5 Peter Hendry
- Re: Issue moving from JDK 1.4 to ... Peter Hendry