Re: Issue moving from JDK 1.4 to 1.5

2007-01-11 Thread Vishal Mahajan
You can use the one argument version of the decryptKey method. There you don't need to specify the algorithm, it's determined automatically from the EncryptedData element. Vishal Peter Hendry wrote: Thanks for the response. Changing to final SecretKey unwrappedKey = (SecretKey)cipher.de

Re: Issue moving from JDK 1.4 to 1.5

2007-01-11 Thread Peter Hendry
That was what I thought originally but when I do that I get a NullPointerException: Exception in thread "main" java.lang.NullPointerException     at org.apache.xml.security.encryption.XMLCipher.decryptKey(Unknown Source)     at pgh.SecurityKeyTests.main(SecurityKeyTests.java:81) I can rebuild

Re: Issue moving from JDK 1.4 to 1.5

2007-01-11 Thread Peter Hendry
I had a debug version to hand already (this is 1.3.0). The problem line is XMLCipher:1309. This line is     return decryptKey(encryptedKey, _ed.getEncryptionMethod().getAlgorithm()); This expects to get the algorithm from the EncryptedData. In the case of unwrapping a key there is no Encrypte