|
IAIK CMS/SMIME Toolkit Demo API Documentation
Version 6.1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdemo.smime.ess.TripleWrappingDemo
public class TripleWrappingDemo
An ESS triple wrapping demo. Creates a RFC2634 ESS triple wrapped (signed - encrypted - signed) message and subsequently parses it to decrypt the layer and verify the signatures.
To run this demo the following packages are required:
iaik_cms.jar
iaik_jce(_full).jar
(IAIK-JCE Core Crypto Library).
mail.jar
(JavaMail API).
activation.jar
(Java Activation Framework; required for JDK versions < 1.6).
EncryptedContent
,
SignedContent
Constructor Summary | |
---|---|
TripleWrappingDemo()
Empty default constructor. |
Method Summary | |
---|---|
javax.mail.Message |
createMessage(javax.mail.Session session,
java.lang.String subject)
Creates a MIME message container with the given subject for the given session. |
static void |
main(java.lang.String[] argv)
Main method. |
void |
start()
Starts the demo. |
javax.mail.Message |
tripleWrap(javax.mail.Session session,
javax.activation.DataHandler dataHandler,
boolean innerImplicit,
boolean outerImplicit,
boolean differentOuterSigner)
Creates a triple wrapped (signed - encrypted - signed) message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TripleWrappingDemo()
Method Detail |
---|
public void start() throws java.io.IOException
java.io.IOException
- if an I/O related error occurspublic javax.mail.Message createMessage(javax.mail.Session session, java.lang.String subject) throws javax.mail.MessagingException
session
- the mail sesionsubject
- the subject of the message
javax.mail.MessagingException
- if the message cannot be createdpublic javax.mail.Message tripleWrap(javax.mail.Session session, javax.activation.DataHandler dataHandler, boolean innerImplicit, boolean outerImplicit, boolean differentOuterSigner) throws java.lang.Exception
session
- the SessiondataHandler
- the data handler providing the raw contentinnerImplicit
- whether to sign the inner content implicitly or explicitlyouterImplicit
- whether to sign the outer content implicitly or explicitlydifferentOuterSigner
- whether to simulate a different outer signer receiving
the signed and encrypted message and adding an outer
layer
java.lang.Exception
public static void main(java.lang.String[] argv) throws java.io.IOException
java.io.IOException
|
IAIK CMS/SMIME Toolkit Demo API Documentation
Version 6.1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
![]() |
v6.1 (c) 2002 IAIK, (c) 2003 - 2025 SIC |
![]() |