|
Oracle Security Developer Tools S/MIME Java API Reference 10g (10.1.4.0.1) B28172-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.crypto.smime.SmimeEnveloped
A S/MIME Enveloped Message.
Constructor Summary | |
SmimeEnveloped(java.io.InputStream is) Create a SmimeEnveloped . |
|
SmimeEnveloped(javax.mail.internet.MimeBodyPart content, oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID) Create a SmimeEnveloped . |
Method Summary | |
void |
addRecipient(oracle.security.crypto.cert.X509 cert) Add a Recipient. |
void |
addRecipient(oracle.security.crypto.cert.X509 cert, oracle.security.crypto.core.AlgorithmIdentifier keyEncryptionAlgID) Add a Recipient. |
java.lang.String |
generateContentType() Returns the content type. |
java.lang.String |
generateContentType(boolean useStandardContentTypes) Returns the content type. |
oracle.security.crypto.core.AlgorithmIdentifier |
getContentEncryptionAlgID() Returns the content encryption algorithm. |
javax.mail.internet.MimeBodyPart |
getEnclosedBodyPart(oracle.security.crypto.core.PrivateKey recipientKey, oracle.security.crypto.cert.X509 recipientCert) Returns the Decrypted Content. |
byte[] |
getEncryptedContent() Returns the raw content (that is, without decrypting). |
java.util.Enumeration |
recipients() Returns the message recipients. |
void |
writeTo(java.io.OutputStream os, java.lang.String mimeType) Writes this SmimeEnveloped to the given output stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SmimeEnveloped(javax.mail.internet.MimeBodyPart content, oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID) throws javax.mail.MessagingException, java.io.IOException
SmimeEnveloped
.content
- The message content.contentEncryptionAlgID
- The content encryption algorithm identifier.javax.mail.MessagingException
- An error occurred while setting the message content.java.io.IOException
public SmimeEnveloped(java.io.InputStream is) throws java.io.IOException
SmimeEnveloped
.is
- The input stream.java.io.IOException
- The input encoding is incorrect or an I/O error occurred.Method Detail |
public javax.mail.internet.MimeBodyPart getEnclosedBodyPart(oracle.security.crypto.core.PrivateKey recipientKey, oracle.security.crypto.cert.X509 recipientCert) throws oracle.security.crypto.core.AlgorithmIdentifierException, oracle.security.crypto.core.InvalidKeyException, oracle.security.crypto.core.CipherException, oracle.security.crypto.cms.UnknownRecipientException, oracle.security.crypto.util.InvalidInputException, javax.mail.MessagingException
recipientKey
- The private key of the recipient.recipientCert
- The X509 certificate of the recipient.oracle.security.crypto.core.AlgorithmIdentifierException
- The content encryption algorithm is not supported.oracle.security.crypto.core.InvalidKeyException
- The private key is not valid.oracle.security.crypto.core.CipherException
- An error occurred during decryption.oracle.security.crypto.util.InvalidInputException
- The message content type is incorrect.javax.mail.MessagingException
- An error occurred while setting the decrypted content.oracle.security.crypto.cms.UnknownRecipientException
- The key pair does not belong to message recipient.public oracle.security.crypto.core.AlgorithmIdentifier getContentEncryptionAlgID()
public java.util.Enumeration recipients()
Enumeration
of CMSRecipientInfo
objects.public byte[] getEncryptedContent()
public java.lang.String generateContentType(boolean useStandardContentTypes)
generateContentType
in interface SmimeObject
useStandardContentTypes
- If true
the standard content type is generated; If false
the experimental content type is generated.public java.lang.String generateContentType()
generateContentType
in interface SmimeObject
public void addRecipient(oracle.security.crypto.cert.X509 cert) throws oracle.security.crypto.core.AlgorithmIdentifierException, oracle.security.crypto.core.CipherException, oracle.security.crypto.core.InvalidKeyException
cert
- The X509 public key certificate.oracle.security.crypto.core.AlgorithmIdentifierException
- The encryption algorithm is not supported.oracle.security.crypto.core.CipherException
- An error occurred during encryption.oracle.security.crypto.core.InvalidKeyException
- The public key is not valid.public void addRecipient(oracle.security.crypto.cert.X509 cert, oracle.security.crypto.core.AlgorithmIdentifier keyEncryptionAlgID) throws oracle.security.crypto.core.AlgorithmIdentifierException, oracle.security.crypto.core.CipherException, oracle.security.crypto.core.InvalidKeyException
cert
- The X509 public key certificate.keyEncryptionAlgID
- The key transport algorithm.oracle.security.crypto.core.AlgorithmIdentifierException
- The encryption algorithm is not supported.oracle.security.crypto.core.CipherException
- An error occurred during encryption.oracle.security.crypto.core.InvalidKeyException
- The public key is not valid.public void writeTo(java.io.OutputStream os, java.lang.String mimeType) throws java.io.IOException, javax.mail.MessagingException
SmimeEnveloped
to the given output stream. Relevant canonicalizations, such as transforming text line-breaks to CRLF
, are applied.writeTo
in interface SmimeObject
os
- The output stream to which this SmimeEnveloped
will be written.mimeType
- Ignored.java.io.IOException
- An I/O error occurred.javax.mail.MessagingException
- An error occurred while creating the smime message.
|
Oracle Security Developer Tools S/MIME Java API Reference 10g (10.1.4.0.1) B28172-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |