IAIK CMS/SMIME Toolkit Demo API Documentation
Version 6.1

demo.smime.basic
Class BinarySignedDemo

java.lang.Object
  extended by demo.smime.basic.BinarySignedDemo

public class BinarySignedDemo
extends java.lang.Object

This class shows how to create, sign and then parse/verify a mulitpart/signed message where the content is not canonicalized.

The only difference to the common usage of this S/MIME library is to use a binary canonicalizer which does not canonicalize the content.

To run this demo the following packages are required:

See Also:
SignedContent, BinaryCanonicalizer

Constructor Summary
BinarySignedDemo()
          Default constructor.
 
Method Summary
 javax.mail.Message createSignedMessage(javax.mail.Session session, javax.activation.DataHandler dataHandler)
          Creates a signed message.
static void main(java.lang.String[] argv)
          The main method.
 void start()
          Starts the demo.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinarySignedDemo

public BinarySignedDemo()
Default constructor. Reads certificates and keys from the demo keystore.

Method Detail

start

public void start()
           throws java.io.IOException
Starts the demo.

Throws:
java.io.IOException - if an I/O related error occurs

createSignedMessage

public javax.mail.Message createSignedMessage(javax.mail.Session session,
                                              javax.activation.DataHandler dataHandler)
                                       throws javax.mail.MessagingException
Creates a signed message.

Parameters:
session - the mail session
dataHandler - the content of the message to be signed
Returns:
the signed message
Throws:
javax.mail.MessagingException - if an error occurs when creating the message

main

public static void main(java.lang.String[] argv)
                 throws java.io.IOException
The main method.

Throws:
java.io.IOException

IAIK CMS/SMIME Toolkit Demo API Documentation
Version 6.1

v6.1
(c) 2002 IAIK, (c) 2003 - 2025 SIC