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
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
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