All,

Can someone explain what's the difference between the following two ways of initializing the javax.crypto.Cipher class for encrypting a symmetric key:

1) Cipher.init(WRAP_MODE, RSAPublicKey)

2) Cipher.init(ENCRYPT_MODE, RSAPublicKey)

I observe that XMLCipher.encryptKey() method always initializes the _contextCipher (javax.crypto.Cipher object) in WRAP_MODE.

Thanks in advance,
Vishal



Reply via email to