|
Oracle Security Developer Tools S/MIME Java API Reference 10g Release 2 (10.1.2.0.2) B15567-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, 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, AlgorithmIdentifier keyEncryptionAlgID) Add a Recipient. |
java.lang.String |
generateContentType() Returns the content type. |
java.lang.String |
generateContentType(boolean useStandardContentTypes) Returns the content type. |
AlgorithmIdentifier |
getContentEncryptionAlgID() Returns the content encryption algorithm. |
javax.mail.internet.MimeBodyPart |
getEnclosedBodyPart(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, 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(PrivateKey recipientKey, oracle.security.crypto.cert.X509 recipientCert) throws AlgorithmIdentifierException, InvalidKeyException, CipherException, oracle.security.crypto.cms.UnknownRecipientException, InvalidInputException, javax.mail.MessagingException
recipientKey
- The private key of the recipient.recipientCert
- The X509 certificate of the recipient.AlgorithmIdentifierException
- The content encryption algorithm is not supported.InvalidKeyException
- The private key is not valid.CipherException
- An error occurred during decryption.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 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 AlgorithmIdentifierException, CipherException, InvalidKeyException
cert
- The X509 public key certificate.AlgorithmIdentifierException
- The encryption algorithm is not supported.CipherException
- An error occurred during encryption.InvalidKeyException
- The public key is not valid.public void addRecipient(oracle.security.crypto.cert.X509 cert, AlgorithmIdentifier keyEncryptionAlgID) throws AlgorithmIdentifierException, CipherException, InvalidKeyException
cert
- The X509 public key certificate.keyEncryptionAlgID
- The key transport algorithm.AlgorithmIdentifierException
- The encryption algorithm is not supported.CipherException
- An error occurred during encryption.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 Release 2 (10.1.2.0.2) B15567-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |