|
Oracle Security Developer Tools CMS Java API Reference 10g Release 3 (10.1.3) B25377-01 |
||||||||
| 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.CMSEnvelopedDataContentInfo
This class encapsulates a CMS object of content type enveloped-data.
| Constructor Summary | |
CMSEnvelopedDataContentInfo()Creates an empty CMSEnvelopedDataContentInfo. |
|
CMSEnvelopedDataContentInfo(CMSContentInfo contentInfo, oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID)Creates a CMSEnvelopedDataContentInfo. |
|
CMSEnvelopedDataContentInfo(java.io.InputStream is)Creates a CMSEnvelopedDataContentInfo object, by reading a BER encoding from the specified input stream. |
|
| Method Summary | |
void |
addRecipient(oracle.security.crypto.core.AlgorithmIdentifier keyEncryptionAlgID, oracle.security.crypto.core.SymmetricKey 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(oracle.security.crypto.cert.X509 recipientCert, oracle.security.crypto.core.AlgorithmIdentifier keyEncryptionAlgID)Add a recipient. |
void |
addRecipient(oracle.security.crypto.cert.X509 recipientCert, oracle.security.crypto.core.AlgorithmIdentifier keyEncryptionAlgID, boolean useSPKI64)Add a recipient. |
boolean |
equals(java.lang.Object obj)Indicates whether some other object is "equal to" this one. |
oracle.security.crypto.core.AlgorithmIdentifier |
getContentEncryptionAlgID()Returns the content encryption algorithm. |
CMSContentInfo |
getEnclosed(oracle.security.crypto.core.PrivateKey privateKey, oracle.security.crypto.cert.X509 recipientCert)Returns the enclosed content after decryption. |
CMSContentInfo |
getEnclosed(oracle.security.crypto.core.SymmetricKey symmetricKey, byte[] keyIdentifier)Returns the enclosed content after decryption. |
CMSContentInfo |
getEnclosed(oracle.security.crypto.core.SymmetricKey symmetricKey, byte[] keyIdentifier, java.util.Date keyDate)Returns the enclosed content after decryption. |
CMSContentInfo |
getEnclosed(oracle.security.crypto.core.SymmetricKey symmetricKey, byte[] keyIdentifier, java.util.Date keyDate, oracle.security.crypto.asn1.ASN1Sequence otherKeyAttribute)Returns the enclosed content after decryption. |
oracle.security.crypto.asn1.ASN1ObjectID |
getEnclosedContentType()Returns the content type of the encrypted content. |
byte[] |
getEncryptedContent()Returns the enclosed content which is encrypted. |
protected byte[] |
getExposedContent()Returns the contents octets of the DER encoding of the content field of this CMS object. |
OriginatorInfo |
getOriginatorInfo()Returns the OriginatorInfo. |
oracle.security.crypto.cert.AttributeSet |
getUnprotectedAttribs()Returns the unprotected 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. |
int |
hashCode()Returns a hash code value for this object. |
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 the encrypted content is not present. |
java.util.Enumeration |
recipients()Returns the list of message recipients. |
void |
setEnclosed(byte[] encryptedContent)Sets the Encrypted 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 origInfo)Sets the OriginatorInfo. |
void |
setUnprotectedAttribs(oracle.security.crypto.cert.AttributeSet unprotectedAttributes)Set the unprotected attributes. |
java.lang.String |
toString()Returns a brief text description of this object. |
protected void |
update()Clears the internal output cache. |
void |
writeDetached(boolean writeDetached)Indicate if the encrypted content must be omitted from this object's output 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, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public CMSEnvelopedDataContentInfo()
CMSEnvelopedDataContentInfo.
public CMSEnvelopedDataContentInfo(CMSContentInfo contentInfo,
oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID)
throws oracle.security.crypto.core.CipherException,
oracle.security.crypto.core.AlgorithmIdentifierException
CMSEnvelopedDataContentInfo.contentInfo - The document to encrypt.contentEncryptionAlgID - The content encryption algorithm.
public CMSEnvelopedDataContentInfo(java.io.InputStream is)
throws java.io.IOException
CMSEnvelopedDataContentInfo object, by reading a BER encoding from the specified 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 error occurs while reading from the input stream.| Method Detail |
public boolean isDetached()
isDetached in class CMSContentInfotrue the encrypted content is not present; false otherwise.protected void setExposedContent(byte[] expContent)
CMSContentInfosetExposedContent in class CMSContentInfonull for a detached CMS object.CMSContentInfo.isDetached()protected byte[] getExposedContent()
CMSContentInfogetExposedContent in class CMSContentInfonull for a detached CMS object.CMSContentInfo.isDetached()public java.math.BigInteger getVersionNumber()
public oracle.security.crypto.asn1.ASN1Integer getVersion()
getVersionNumber()public oracle.security.crypto.asn1.ASN1ObjectID getEnclosedContentType()
public oracle.security.crypto.core.AlgorithmIdentifier getContentEncryptionAlgID()
public java.lang.String toString()
public java.util.Enumeration recipients()
CMSRecipientInfo objects.public int hashCode()
public boolean equals(java.lang.Object obj)
true if this object is the same as the obj argument; false otherwise.public void writeDetached(boolean writeDetached)
writeDetached - true if the encrypted content is to be omitted from this object's encoded output; false otherwise.CMSContentInfo.isDetached()public void setEnclosed(byte[] encryptedContent)
encryptedContent - The encrypted CMSContentInfo.
public void addRecipient(oracle.security.crypto.cert.X509 recipientCert,
oracle.security.crypto.core.AlgorithmIdentifier keyEncryptionAlgID)
throws oracle.security.crypto.core.AlgorithmIdentifierException,
oracle.security.crypto.core.CipherException,
oracle.security.crypto.core.InvalidKeyException
Uses the Key Transport Recipient Information with IssuerAndSerialNumber as the Recipient Identifier.
recipientCert - The recipient's public key certificate.keyEncryptionAlgID - The key encipherment algorithm.oracle.security.crypto.core.AlgorithmIdentifierException - Unrecognized algorithm identifier.oracle.security.crypto.core.CipherException - An error occurred during encryption.oracle.security.crypto.core.InvalidKeyException - Invalid content encryption key.
public void addRecipient(oracle.security.crypto.cert.X509 recipientCert,
oracle.security.crypto.core.AlgorithmIdentifier keyEncryptionAlgID,
boolean useSPKI64)
throws oracle.security.crypto.core.AlgorithmIdentifierException,
oracle.security.crypto.core.CipherException,
oracle.security.crypto.core.InvalidKeyException
Uses the Key Transport Recipient Information with Subject Key Identifier as the Recipient Identifier.
recipientCert - The recipient's public key certificate.keyEncryptionAlgID - The key encipherment algorithm.useSPKI64 - Uses Subject Public Key Identifier as the recipient identifier. true use 64 bit PKI; false use 160 bit SPKI.oracle.security.crypto.core.AlgorithmIdentifierException - Unrecognized algorithm identifier.oracle.security.crypto.core.CipherException - An error occurred during encryption.oracle.security.crypto.core.InvalidKeyException - Invalid content encryption key.
public void addRecipient(CMSRecipientInfoSpec ris)
throws oracle.security.crypto.core.AlgorithmIdentifierException,
oracle.security.crypto.core.CipherException,
oracle.security.crypto.util.InvalidInputException,
oracle.security.crypto.core.InvalidKeyException
Uses the Key Encryption Key Recipient Information.
ris - The recipient's information.oracle.security.crypto.util.InvalidInputException - Unrecognized RecipientInfoSpec.oracle.security.crypto.core.AlgorithmIdentifierException - Unrecognized algorithm identifier.oracle.security.crypto.core.CipherException - An error occurred during encryption.oracle.security.crypto.core.InvalidKeyException - Invalid content encryption key.
public void addRecipient(oracle.security.crypto.core.AlgorithmIdentifier keyEncryptionAlgID,
oracle.security.crypto.core.SymmetricKey keyEncryptionKey,
byte[] keyIdentifier,
java.util.Date keyDate,
oracle.security.crypto.asn1.ASN1Sequence otherKeyAttribute)
throws oracle.security.crypto.core.AlgorithmIdentifierException,
oracle.security.crypto.core.CipherException,
oracle.security.crypto.core.InvalidKeyException,
oracle.security.crypto.util.InvalidInputException
Uses the Key Encryption Key Recipient Information.
oracle.security.crypto.core.AlgorithmIdentifierException - Unrecognized algorithm identifier.oracle.security.crypto.core.CipherException - An error occurred during encryption.oracle.security.crypto.core.InvalidKeyException - Invalid content encryption key.oracle.security.crypto.util.InvalidInputException
public CMSContentInfo getEnclosed(oracle.security.crypto.core.PrivateKey privateKey,
oracle.security.crypto.cert.X509 recipientCert)
throws oracle.security.crypto.core.AlgorithmIdentifierException,
oracle.security.crypto.core.InvalidKeyException,
oracle.security.crypto.core.CipherException,
UnknownRecipientException,
oracle.security.crypto.util.InvalidInputException
Assumes that Key Transport Recipient Information is used.
oracle.security.crypto.core.AlgorithmIdentifierException - Unrecognized algorithm identifier.oracle.security.crypto.core.CipherException - An error occurred during encryption.oracle.security.crypto.core.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.
public CMSContentInfo getEnclosed(oracle.security.crypto.core.SymmetricKey symmetricKey,
byte[] keyIdentifier)
throws oracle.security.crypto.core.AlgorithmIdentifierException,
oracle.security.crypto.core.InvalidKeyException,
oracle.security.crypto.core.CipherException,
UnknownRecipientException,
oracle.security.crypto.util.InvalidInputException
Assumes that Key Encryption Key Recipient Information is used.
symmetricKey - The previously distributed symmetric key.keyIdentifier - Key identifier.oracle.security.crypto.core.AlgorithmIdentifierException - Unrecognized algorithm identifier.oracle.security.crypto.core.CipherException - An error occurred during encryption.oracle.security.crypto.core.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.
public CMSContentInfo getEnclosed(oracle.security.crypto.core.SymmetricKey symmetricKey,
byte[] keyIdentifier,
java.util.Date keyDate)
throws oracle.security.crypto.core.AlgorithmIdentifierException,
oracle.security.crypto.core.InvalidKeyException,
oracle.security.crypto.core.CipherException,
UnknownRecipientException,
oracle.security.crypto.util.InvalidInputException
Assumes that Key Encryption Key Recipient Information is used.
symmetricKey - The previously distributed symmetric key.keyIdentifier - Key identifier.keyDate - Key generation date.oracle.security.crypto.core.AlgorithmIdentifierException - Unrecognized algorithm identifier.oracle.security.crypto.core.CipherException - An error occurred during encryption.oracle.security.crypto.core.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.
public CMSContentInfo getEnclosed(oracle.security.crypto.core.SymmetricKey symmetricKey,
byte[] keyIdentifier,
java.util.Date keyDate,
oracle.security.crypto.asn1.ASN1Sequence otherKeyAttribute)
throws oracle.security.crypto.core.AlgorithmIdentifierException,
oracle.security.crypto.core.InvalidKeyException,
oracle.security.crypto.core.CipherException,
UnknownRecipientException,
oracle.security.crypto.util.InvalidInputException
Assumes that Key Encryption Key Recipient Information is used.
symmetricKey - The previously distributed symmetric key.keyIdentifier - Key identifier.keyDate - Key generation date.otherKeyAttribute - The Other Key Attribute.oracle.security.crypto.core.AlgorithmIdentifierException - Unrecognized algorithm identifier.oracle.security.crypto.core.CipherException - An error occurred during encryption.oracle.security.crypto.core.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.
protected void inputContent(java.io.InputStream is)
throws java.io.IOException
CMSContentInfoThis method must be implemented by subclasses. It is unlikely that package users will ever need to call it directly.
inputContent in class CMSContentInfojava.io.IOExceptionpublic byte[] getEncryptedContent()
public void setOriginatorInfo(OriginatorInfo origInfo)
Do not use this method if PKCS#7 v1.5 interoperability is required.
origInfo - The OriginatorInfo.public OriginatorInfo getOriginatorInfo()
OriginatorInfo if present or null otherwise.public void setUnprotectedAttribs(oracle.security.crypto.cert.AttributeSet unprotectedAttributes)
unprotectedAttributes - The unprotected attributes.public oracle.security.crypto.cert.AttributeSet getUnprotectedAttribs()
null otherwise.protected void update()
update in class CMSContentInfo
|
Oracle Security Developer Tools CMS Java API Reference 10g Release 3 (10.1.3) B25377-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||