This class encapsulates a CMS object of content type authenticated-data. Previously, contentAuthenticationKey( oracle.security.crypto.core.Symmetric key) was a part of this class.It has been replaced by contentAuthenticationkeyBytes(array of key bytes) and contentAuthentication Algorithm Name.

setExposedContent

Returns the contents octets of the DER encoding of the content field of this CMS object. The value returned is suitable for input to the "message-digesting" and "content-encryption" process of RFC-2630.

getExposedContent

Returns the contents octets of the DER encoding of the content field of this CMS object. The value returned is suitable for input to the "message-digesting" and "content-encryption" process of RFC-2630.

Uses the Key Transport Recipient Information with IssuerAndSerialNo as the Recipient Identifier.

Note the changes in the method signature

Previously public void addRecipient (X509 , AlgorithmIdentifier )

Now public void addRecipient (X509Certificate , AlgorithmIdentifier )

Note the change in the exceptions declared to be thrown. AlgorithmIdentifierException, and CipherException are no longer thrown. Instead, NoSuchPaddingException,NoSuchAlgorithmException, BadPaddingException, IllegalBlockSizeException, CertificateEncodingException,IOException are thrown.

Parameters:

recipientCert - The recipient's public key certificate.

keyEncryptionAlgID - The key encipherment algorithm.

Throws:

java.security.InvalidKeyException - Invalid content encryption key.

javax.crypto.NoSuchPaddingException - Padding mechanism not supported

java.security.NoSuchAlgorithmException - Algorithm Not supported

javax.crypto.BadPaddingException - Expected padding in the input not found

Note the change in the exceptions declared to be thrown. AlgorithmIdentifierException and CipherException are no longer thrown. Instead, NoSuchPaddingException,NoSuchAlgorithmException, BadPaddingException, IllegalBlockSizeException are thrown.

update

protected void update()

Clears the internal output cache. This method is called automatically if the object ever changes, so API users need not be concerned with it. Implementors of subclasses, however, do need to ensure that it gets called when appropriate.