|
Oracle Fusion Middleware CMS Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10667-04 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.crypto.cms.CMSContentInfo
oracle.security.crypto.cms.CMSAuthenticatedDataContentInfo
public class CMSAuthenticatedDataContentInfo
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.
Constructor Summary | |
---|---|
CMSAuthenticatedDataContentInfo() Creates an empty CMSAuthenticatedDataContentInfo . |
|
CMSAuthenticatedDataContentInfo(CMSContentInfo contentInfo, javax.crypto.SecretKey hmacKey, oracle.security.crypto.core.AlgorithmIdentifier macAlgorithm) Creates a CMSAuthenticatedDataContentInfo . |
|
CMSAuthenticatedDataContentInfo(CMSContentInfo contentInfo, javax.crypto.SecretKey hmacKey, OriginatorInfo originatorInfo, oracle.security.crypto.core.AlgorithmIdentifier macAlgorithm, oracle.security.crypto.core.AlgorithmIdentifier digestAlgorithm, oracle.security.crypto.cert.AttributeSet authenticatedAttributes, oracle.security.crypto.cert.AttributeSet unauthenticatedAttributes) Creates a CMSAuthenticatedDataContentInfo . |
|
CMSAuthenticatedDataContentInfo(CMSContentInfo contentInfo, javax.crypto.SecretKey hmacKey, java.lang.String hmacKeyAlgo, OriginatorInfo originatorInfo, oracle.security.crypto.core.AlgorithmIdentifier macAlgorithm, oracle.security.crypto.core.AlgorithmIdentifier digestAlgorithm, oracle.security.crypto.cert.AttributeSet authenticatedAttributes, oracle.security.crypto.cert.AttributeSet unauthenticatedAttributes) Creates a CMSAuthenticatedDataContentInfo . |
|
CMSAuthenticatedDataContentInfo(java.io.InputStream is) Creates a CMSAuthenticatedDataContentInfo by reading a BER encoding from the given input stream. |
Method Summary | |
---|---|
void |
addRecipient(oracle.security.crypto.core.AlgorithmIdentifier keyEncryptionAlgID, javax.crypto.SecretKey keyEncryptionKey, byte[] keyIdentifier, java.util.Date keyDate, oracle.security.crypto.asn1.ASN1Sequence otherKeyAttribute) Add a recipient. |
void |
addRecipient(CMSRecipientInfoSpec ris) Add a recipient. |
void |
addRecipient(java.security.cert.X509Certificate recipientCert, oracle.security.crypto.core.AlgorithmIdentifier keyEncryptionAlgID) Add a recipient. |
void |
addRecipient(java.security.cert.X509Certificate recipientCert, oracle.security.crypto.core.AlgorithmIdentifier keyEncryptionAlgID, boolean useSPKI64) Add a recipient. |
oracle.security.crypto.cert.AttributeSet |
getAuthenticatedAttributes() Returns the Authenticated Attributes. |
oracle.security.crypto.core.AlgorithmIdentifier |
getDigestAlgID() Returns the digest algorithm. |
CMSContentInfo |
getEnclosed() Returns the authenticated content. |
oracle.security.crypto.asn1.ASN1ObjectID |
getEnclosedContentType() Returns the content type of the enclosed content. |
protected byte[] |
getExposedContent() Returns the contents octets of the DER encoding of the content field of this CMS object. |
byte[] |
getMAC() Returns the message authentication code. |
oracle.security.crypto.core.AlgorithmIdentifier |
getMACAlgID() Returns the MAC algorithm used for authentication. |
OriginatorInfo |
getOriginatorInfo() Returns the Originator Info. |
oracle.security.crypto.cert.AttributeSet |
getUnauthenticatedAttributes() Returns the Unauthenticated Attributes. |
oracle.security.crypto.asn1.ASN1Integer |
getVersion() Deprecated. As of Phaos CMS 2.0.1, replaced by getVersionNumber() |
java.math.BigInteger |
getVersionNumber() Returns the version number. |
protected void |
inputContent(java.io.InputStream is) Initializes this object by reading the Content field of the CMS ContentInfo structure i.e. |
boolean |
isDetached() Indicates if this object is detached. |
java.util.Enumeration |
recipients() Returns the list of message recipients. |
void |
setAuthenticatedAttributes(oracle.security.crypto.cert.AttributeSet authenticatedAttributes, oracle.security.crypto.core.AlgorithmIdentifier digestAlgorithm) Set the Authenticated attributes. |
void |
setEnclosed(CMSContentInfo content) Sets the authenticated content. |
protected void |
setExposedContent(byte[] expContent) Returns the contents octets of the DER encoding of the content field of this CMS object. |
void |
setOriginatorInfo(OriginatorInfo originatorInfo) Set the OriginatorInfo. |
void |
setUnauthenticatedAttributes(oracle.security.crypto.cert.AttributeSet unauthenticatedAttributes) Set the unauthenticated attributes. |
java.lang.String |
toString() Returns a brief text description of this object. |
protected void |
update() Clears the internal output cache. |
void |
verifyMAC(java.security.PrivateKey privateKey, java.security.cert.X509Certificate recipientCert) Returns the enclosed content after decryption. |
void |
verifyMAC(javax.crypto.SecretKey symmetricKey, byte[] keyIdentifier) Returns the enclosed content after decryption. |
void |
verifyMAC(javax.crypto.SecretKey symmetricKey, byte[] keyIdentifier, java.util.Date keyDate) Returns the enclosed content after decryption. |
void |
verifyMAC(javax.crypto.SecretKey symmetricKey, byte[] keyIdentifier, java.util.Date keyDate, oracle.security.crypto.asn1.ASN1Sequence otherKeyAttribute) Returns the enclosed content after decryption. |
void |
writeDetached(boolean writeDetachedObject) Indicate if the CMS Object that is being authenticated should be omitted while generating this object's encoding. |
Methods inherited from class oracle.security.crypto.cms.CMSContentInfo |
---|
computeDigest, contentTypeName, getContentType, input, inputInstance, isDegenerate, length, output |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CMSAuthenticatedDataContentInfo()
CMSAuthenticatedDataContentInfo
.public CMSAuthenticatedDataContentInfo(CMSContentInfo contentInfo, javax.crypto.SecretKey hmacKey, oracle.security.crypto.core.AlgorithmIdentifier macAlgorithm) throws oracle.security.crypto.util.InvalidInputException, java.security.NoSuchAlgorithmException, java.security.spec.InvalidKeySpecException, java.security.InvalidKeyException
CMSAuthenticatedDataContentInfo
.
Note the change in method signature :
Previously : public CMSAuthenticatedDataContentInfo (CMSContentInfo ,SymmetricKey , AlgorithmIdentifier )
Now : public CMSAuthenticatedDataContentInfo (CMSContentInfo ,SecretKey , AlgorithmIdentifier )
Note the changes in the exceptions thrown AlgorithmIdentifier Exception is no longer thrown NoSuchAlgorithmException, InvalidKeySpecException and InvalidKeyException are also thrown now
contentInfo
- The document to authenticate.hmacKey
- The key to use for the HMAC operation.macAlgorithm
- The message authentication algorithm.oracle.security.crypto.util.InvalidInputException
- Input parameters are incomplete or invalid.java.security.NoSuchAlgorithmException
- Algorithm is not supported.java.security.spec.InvalidKeySpecException
- The Key Specification is invalidjava.security.InvalidKeyException
- The Key is invalidpublic CMSAuthenticatedDataContentInfo(CMSContentInfo contentInfo, javax.crypto.SecretKey hmacKey, OriginatorInfo originatorInfo, oracle.security.crypto.core.AlgorithmIdentifier macAlgorithm, oracle.security.crypto.core.AlgorithmIdentifier digestAlgorithm, oracle.security.crypto.cert.AttributeSet authenticatedAttributes, oracle.security.crypto.cert.AttributeSet unauthenticatedAttributes) throws oracle.security.crypto.util.InvalidInputException, java.security.NoSuchAlgorithmException, java.security.spec.InvalidKeySpecException, java.security.InvalidKeyException
CMSAuthenticatedDataContentInfo
.
Note the change in method signature :
Previously : public CMSAuthenticatedDataContentInfo (CMSContentInfo , SymmetricKey , OriginatorInfo , AlgorithmIdentifier , AlgorithmIdentifier, AttributeSet , AttributeSet)
Now : public CMSAuthenticatedDataContentInfo (CMSContentInfo , SecretKey, OriginatorInfo , AlgorithmIdentifier ,AlgorithmIdentifier, AttributeSet , AttributeSet )
Note the changes in the exceptions thrown AlgorithmIdentifier Exception is no longer thrown NoSuchAlgorithmException, InvalidKeySpecException and InvalidKeyException are also thrown now
Note that the Authenticated Attributes 'Content Type' and 'Message Digest' are automatically added.
contentInfo
- The document to authenticate.hmacKey
- The key to use for the HMAC operation.originatorInfo
- The originator information.macAlgorithm
- The message authentication algorithm.digestAlgorithm
- The message digest algorithm.authenticatedAttributes
- The set of authenticatedAttributes.unauthenticatedAttributes
- The set of unauthenticatedAttributes.oracle.security.crypto.util.InvalidInputException
- Input parameters are incomplete or invalid.java.security.NoSuchAlgorithmException
- Algorithm is not supported.java.security.spec.InvalidKeySpecException
- The Key Specification is invalidjava.security.InvalidKeyException
- The Key is invalidpublic CMSAuthenticatedDataContentInfo(CMSContentInfo contentInfo, javax.crypto.SecretKey hmacKey, java.lang.String hmacKeyAlgo, OriginatorInfo originatorInfo, oracle.security.crypto.core.AlgorithmIdentifier macAlgorithm, oracle.security.crypto.core.AlgorithmIdentifier digestAlgorithm, oracle.security.crypto.cert.AttributeSet authenticatedAttributes, oracle.security.crypto.cert.AttributeSet unauthenticatedAttributes) throws oracle.security.crypto.util.InvalidInputException, java.security.NoSuchAlgorithmException, java.security.spec.InvalidKeySpecException, java.security.InvalidKeyException
CMSAuthenticatedDataContentInfo
.
Note the change in method signature :
Previously : public CMSAuthenticatedDataContentInfo (CMSContentInfo , SymmetricKey , String , OriginatorInfo , AlgorithmIdentifier, AlgorithmIdentifier , AttributeSet , AttributeSet )
Now : public CMSAuthenticatedDataContentInfo (CMSContentInfo , SecretKey , String , OriginatorInfo , AlgorithmIdentifier, AlgorithmIdentifier , AttributeSet ,AttributeSet )
Note the changes in the exception thrown AlgorithmIdentifier Exception is no longer thrown NoSuchAlgorithmException, InvalidKeySpecException and InvalidKeyException are also thrown now
Note that the Authenticated Attributes 'Content Type' and 'Message Digest' are automatically added.
contentInfo
- The document to authenticate.hmacKey
- The key to use for the HMAC operation. (was previously Symmetric Key - Phaos Class)originatorInfo
- The originator information.macAlgorithm
- The message authentication algorithm.digestAlgorithm
- The message digest algorithm.authenticatedAttributes
- The set of authenticatedAttributes.unauthenticatedAttributes
- The set of unauthenticatedAttributes.oracle.security.crypto.util.InvalidInputException
- Input parameters are incomplete or invalid.java.security.NoSuchAlgorithmException
- Algorithm is not supported.java.security.spec.InvalidKeySpecException
- The Key Specification is invalidjava.security.InvalidKeyException
- The Key is invalidpublic CMSAuthenticatedDataContentInfo(java.io.InputStream is) throws java.io.IOException
CMSAuthenticatedDataContentInfo
by reading a BER encoding from the given input stream.
is
- The input stream.java.io.IOException
- If the input is not correctly formatted, has the wrong content type or an I/O exception occurs while reading from the input stream.Method Detail |
---|
public boolean isDetached()
isDetached
in class CMSContentInfo
true
if detached; false
otherwise.CMSContentInfo.isDetached()
public void writeDetached(boolean writeDetachedObject)
writeDetachedObject
- If true
, the CMS Object that is being authenticated is not output; false
otherwise.CMSContentInfo.isDetached()
protected void setExposedContent(byte[] expContent)
CMSContentInfo
setExposedContent
in class CMSContentInfo
CMSContentInfo.isDetached()
protected byte[] getExposedContent()
CMSContentInfo
getExposedContent
in class CMSContentInfo
null
for a detached CMS object.CMSContentInfo.isDetached()
public java.math.BigInteger getVersionNumber()
public oracle.security.crypto.asn1.ASN1Integer getVersion()
getVersionNumber()
public OriginatorInfo getOriginatorInfo()
OriginatorInfo
if present or null
otherwise.public oracle.security.crypto.core.AlgorithmIdentifier getMACAlgID()
public oracle.security.crypto.core.AlgorithmIdentifier getDigestAlgID()
null
otherwise.public oracle.security.crypto.asn1.ASN1ObjectID getEnclosedContentType()
public CMSContentInfo getEnclosed()
public void setEnclosed(CMSContentInfo content)
This is used to set the contents of a detached authenticated-data CMS object.
content
- The content object.public byte[] getMAC()
public oracle.security.crypto.cert.AttributeSet getAuthenticatedAttributes()
null
otherwise.public oracle.security.crypto.cert.AttributeSet getUnauthenticatedAttributes()
null
otherwise.public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Enumeration recipients()
CMSRecipientInfo
objects.public void addRecipient(java.security.cert.X509Certificate recipientCert, oracle.security.crypto.core.AlgorithmIdentifier keyEncryptionAlgID) throws java.security.InvalidKeyException, javax.crypto.NoSuchPaddingException, java.security.NoSuchAlgorithmException, javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, java.security.cert.CertificateEncodingException, java.io.IOException
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.
recipientCert
- The recipient's public key certificate.keyEncryptionAlgID
- The key encipherment algorithm.java.security.InvalidKeyException
- Invalid content encryption key.javax.crypto.NoSuchPaddingException
- Padding mechanism not supportedjava.security.NoSuchAlgorithmException
- Algorithm Not supportedjavax.crypto.BadPaddingException
- Expected padding in the input not foundjavax.crypto.IllegalBlockSizeException
- Invalid Block size (Cipher)java.security.cert.CertificateEncodingException
- Specifies an encoding errorjava.io.IOException
- Input/Output Exception while instantiating X509 from an inputstreampublic void addRecipient(java.security.cert.X509Certificate recipientCert, oracle.security.crypto.core.AlgorithmIdentifier keyEncryptionAlgID, boolean useSPKI64) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.NoSuchPaddingException
Uses the Key Transport Recipient Information with Key Identifier as the Recipient Identifier.
Note the changes in the method signature
Previously public void addRecipient (X509 , AlgorithmIdentifier,boolean )
Now public void addRecipient (X509Certificate , AlgorithmIdentifier,boolean )
Note the change in the exceptions declared to be thrown. AlgorithmIdentifierException and CipherException are no longer thrown. Instead, NoSuchPaddingException,NoSuchAlgorithmException, BadPaddingException, IllegalBlockSizeException are thrown.
recipientCert
- The recipient's public key certificate.keyEncryptionAlgID
- The key encipherment algorithm.useSPKI64
- Uses SPKI as the recipient identifier. If True use 64 bit SPKI; False use 160 bit SPKI.java.security.NoSuchAlgorithmException
- Unrecognized algorithm identifier.java.security.InvalidKeyException
- Invalid content encryption key.javax.crypto.NoSuchPaddingException
- Padding mechanism not supportedjavax.crypto.BadPaddingException
- Expected padding in the input not foundjavax.crypto.IllegalBlockSizeException
- Invalid Block size (Cipher)public void addRecipient(CMSRecipientInfoSpec ris) throws oracle.security.crypto.util.InvalidInputException, java.security.InvalidKeyException, javax.crypto.NoSuchPaddingException, java.security.NoSuchAlgorithmException, javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, java.security.InvalidAlgorithmParameterException, java.security.spec.InvalidKeySpecException
Note the changes in the list of Exceptions thrown. Exceptions no longer thrown - AlgorithmIdentifierException and CipherException Exceptions introduced - NoSuchPaddingException, NoSuchAlgorithmException,BadPaddingException, IllegalBlockSizeException,InvalidAlgorithmParameterException, InvalidKeySpecException
ris
- The recipient's information.oracle.security.crypto.util.InvalidInputException
- Unrecognized RecipientInfoSpec.java.security.InvalidKeyException
- Invalid content encryption key.javax.crypto.NoSuchPaddingException
- Padding mechanism not supportedjavax.crypto.BadPaddingException
- Expected padding in the input not foundjavax.crypto.IllegalBlockSizeException
- Invalid Block size (Cipher)java.security.NoSuchAlgorithmException
- Unrecognized algorithm identifier.java.security.InvalidAlgorithmParameterException
- AlgorithmParameters are not validjava.security.spec.InvalidKeySpecException
- InvalidKey Specificationpublic void addRecipient(oracle.security.crypto.core.AlgorithmIdentifier keyEncryptionAlgID, javax.crypto.SecretKey keyEncryptionKey, byte[] keyIdentifier, java.util.Date keyDate, oracle.security.crypto.asn1.ASN1Sequence otherKeyAttribute) throws java.security.InvalidKeyException, oracle.security.crypto.util.InvalidInputException, java.security.NoSuchAlgorithmException, javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.NoSuchPaddingException, java.security.InvalidAlgorithmParameterException, java.security.spec.InvalidKeySpecException
Uses the Key Encryption Key Recipient Information.
Note the changes in the method signature
Previously public void addRecipient (AlgorithmIdentifier , SymmetricKey, byte[], Date , ASN1Sequence)
Now public void addRecipient (AlgorithmIdentifier , SecretKey, byte[], Date , ASN1Sequence)
Note the change in the exceptions declared to be thrown. Exceptions no longer thrown - AlgorithmIdentifierException and CipherException Exceptions introduced - NoSuchPaddingException, NoSuchAlgorithmException,BadPaddingException, IllegalBlockSizeException,InvalidAlgorithmParameterException, InvalidKeySpecException
keyEncryptionAlgID
- The key encrption (wrap) algorithm.keyEncryptionKey
- The key encryption (wrap) key.keyIdentifier
- The key identifier.keyDate
- The key generation date.otherKeyAttribute
- The other key attribute.oracle.security.crypto.util.InvalidInputException
- Unrecognized RecipientInfoSpec.java.security.InvalidKeyException
- Invalid content encryption key.javax.crypto.NoSuchPaddingException
- Padding mechanism not supportedjavax.crypto.BadPaddingException
- Expected padding in the input not foundjavax.crypto.IllegalBlockSizeException
- Invalid Block size (Cipher)java.security.NoSuchAlgorithmException
- Unrecognized algorithm identifier.java.security.InvalidAlgorithmParameterException
- AlgorithmParameters are not validjava.security.spec.InvalidKeySpecException
- InvalidKey Specificationpublic void verifyMAC(java.security.PrivateKey privateKey, java.security.cert.X509Certificate recipientCert) throws java.security.InvalidKeyException, UnknownRecipientException, oracle.security.crypto.util.InvalidInputException, oracle.security.crypto.core.AuthenticationException, java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException, javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, java.security.cert.CertificateEncodingException, java.io.IOException, java.security.spec.InvalidKeySpecException
Recipient Information uses the Key Transport Mechanism.
Note the changes in the method signature
Previously public void verifyMAC (oracle.security.crypto.core.PrivateKey , X509)
Now public void verifyMAC (java.security.PrivateKey , X509Certificate)
Note the change in the exceptions declared to be thrown. Exceptions no longer thrown - AlgorithmIdentifierException and CipherException Exceptions introduced - NoSuchAlgorithmException, NoSuchPaddingException, BadPaddingException, IllegalBlockSizeException, CertificateEncodingException,IOException,InvalidKeySpecException
privateKey
- The recipient's private key.recipientCert
- The recipient's X509 certificate.java.security.InvalidKeyException
- Invalid content encryption key.UnknownRecipientException
- The decryption key does belong to the recipient.oracle.security.crypto.util.InvalidInputException
- If an incorrect encoding or I/O error occurred.javax.crypto.NoSuchPaddingException
- Padding mechanism not supportedjavax.crypto.BadPaddingException
- Expected padding in the input not foundjavax.crypto.IllegalBlockSizeException
- Invalid Block size (Cipher)java.security.NoSuchAlgorithmException
- Unrecognized algorithm identifier.java.io.IOException
java.security.spec.InvalidKeySpecException
- InvalidKey Specificationjava.security.cert.CertificateEncodingException
- error while encoding the certificateoracle.security.crypto.core.AuthenticationException
- MAC Verification failedpublic void verifyMAC(javax.crypto.SecretKey symmetricKey, byte[] keyIdentifier) throws java.security.InvalidKeyException, UnknownRecipientException, oracle.security.crypto.util.InvalidInputException, oracle.security.crypto.core.AuthenticationException, java.security.NoSuchAlgorithmException, javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.NoSuchPaddingException, java.security.InvalidAlgorithmParameterException, java.security.spec.InvalidKeySpecException
Recipient Information uses Key Encryption Key Mechanism.
Note the changes in the method signature
Previously public void verifyMAC ( SymmetricKey, byte[] )
Now public void verifyMAC (SecretKey , byte[] )
Note the change in the exceptions declared to be thrown. Exceptions no longer thrown - AlgorithmIdentifierException and CipherException Exceptions introduced - NoSuchAlgorithmException, NoSuchPaddingException, BadPaddingException, IllegalBlockSizeException, InvalidKeySpecException,InvalidAlgorithmParameterException
symmetricKey
- The previously distributed symmetric key.keyIdentifier
- The key identifier.UnknownRecipientException
- The decryption key does belong to the recipient.oracle.security.crypto.util.InvalidInputException
- If an incorrect encoding or I/O error occurred.javax.crypto.NoSuchPaddingException
- Padding mechanism not supportedjavax.crypto.BadPaddingException
- Expected padding in the input not foundjavax.crypto.IllegalBlockSizeException
- Invalid Block size (Cipher)java.security.NoSuchAlgorithmException
- Unrecognized algorithm identifier.java.security.spec.InvalidKeySpecException
- InvalidKey Specificationjava.security.InvalidAlgorithmParameterException
- Invalid AlgorithmParametersoracle.security.crypto.core.AuthenticationException
- Authentication failedjava.security.InvalidKeyException
- The key is invalidpublic void verifyMAC(javax.crypto.SecretKey symmetricKey, byte[] keyIdentifier, java.util.Date keyDate) throws java.security.InvalidKeyException, UnknownRecipientException, oracle.security.crypto.util.InvalidInputException, oracle.security.crypto.core.AuthenticationException, java.security.NoSuchAlgorithmException, javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.NoSuchPaddingException, java.security.InvalidAlgorithmParameterException, java.security.spec.InvalidKeySpecException
Recipient Information uses Key Encryption Key Mechanism.
Note the changes in the method signature
Previously public void verifyMAC ( SymmetricKey, byte[],Date )
Now public void verifyMAC (SecretKey , byte[] ,Date)
Note the change in the exceptions declared to be thrown. Exceptions no longer thrown - AlgorithmIdentifierException and CipherException Exceptions introduced - NoSuchAlgorithmException, NoSuchPaddingException, BadPaddingException, IllegalBlockSizeException, InvalidKeySpecException,InvalidAlgorithmParameterException
symmetricKey
- The previously distributed symmetric key.keyIdentifier
- Key identifier.keyDate
- Key generation date.UnknownRecipientException
- The decryption key does belong to the recipient.oracle.security.crypto.util.InvalidInputException
- If an incorrect encoding or I/O error occurred.javax.crypto.NoSuchPaddingException
- Padding mechanism not supportedjavax.crypto.BadPaddingException
- Expected padding in the input not foundjavax.crypto.IllegalBlockSizeException
- Invalid Block size (Cipher)java.security.NoSuchAlgorithmException
- Unrecognized algorithm identifier.java.security.spec.InvalidKeySpecException
- InvalidKey Specificationjava.security.InvalidAlgorithmParameterException
- Invalid AlgorithmParametersoracle.security.crypto.core.AuthenticationException
- Authentication failedjava.security.InvalidKeyException
- The key is invalidpublic void verifyMAC(javax.crypto.SecretKey symmetricKey, byte[] keyIdentifier, java.util.Date keyDate, oracle.security.crypto.asn1.ASN1Sequence otherKeyAttribute) throws java.security.InvalidKeyException, UnknownRecipientException, oracle.security.crypto.util.InvalidInputException, oracle.security.crypto.core.AuthenticationException, java.security.NoSuchAlgorithmException, javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.NoSuchPaddingException, java.security.InvalidAlgorithmParameterException, java.security.spec.InvalidKeySpecException
Recipient Information uses Key Encryption Key Mechanism.
Note the changes in the method signature
Previously public void verifyMAC ( SymmetricKey, byte[], Date, ASN1Sequence )
Now public void verifyMAC (SecretKey , byte[] , Date, ASN1Sequence)
Note the change in the exceptions declared to be thrown. Exceptions no longer thrown - AlgorithmIdentifierException , CipherException Exceptions introduced - NoSuchAlgorithmException, NoSuchPaddingException, BadPaddingException, IllegalBlockSizeException, InvalidKeySpecException,InvalidAlgorithmParameterException
symmetricKey
- The previously distributed symmetric key.keyIdentifier
- The key identifier.keyDate
- The key generation date.otherKeyAttribute
- The other key attribute.java.security.InvalidKeyException
- Invalid content encryption key.UnknownRecipientException
- The decryption key does belong to the recipient.oracle.security.crypto.util.InvalidInputException
- If an incorrect encoding or I/O error occurred.oracle.security.crypto.core.AuthenticationException
- MAC verification failedjavax.crypto.NoSuchPaddingException
- Padding mechanism not supportedjavax.crypto.BadPaddingException
- Expected padding in the input not foundjavax.crypto.IllegalBlockSizeException
- Invalid Block size (Cipher)java.security.NoSuchAlgorithmException
- Unrecognized algorithm identifier.java.security.spec.InvalidKeySpecException
- InvalidKey Specificationjava.security.InvalidAlgorithmParameterException
- Invalid AlgorithmParametersprotected void inputContent(java.io.InputStream is) throws java.io.IOException
CMSContentInfo
This method must be implemented by subclasses. It is unlikely that package users will ever need to call it directly.
inputContent
in class CMSContentInfo
java.io.IOException
public void setOriginatorInfo(OriginatorInfo originatorInfo)
Do not use this method if PKCS#7 v1.5 interoperability is required.
origInfo
- The OriginatorInfo.public void setUnauthenticatedAttributes(oracle.security.crypto.cert.AttributeSet unauthenticatedAttributes)
unauthenticatedAttributes
- The unauthenticated attributes.public void setAuthenticatedAttributes(oracle.security.crypto.cert.AttributeSet authenticatedAttributes, oracle.security.crypto.core.AlgorithmIdentifier digestAlgorithm) throws oracle.security.crypto.util.InvalidInputException
authenticatedAttributes
- The authenticated attributes.digestAlgorithm
- The Message Digest Algorithm.oracle.security.crypto.util.InvalidInputException
protected void update()
update
in class CMSContentInfo
|
Oracle Fusion Middleware CMS Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10667-04 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |