public class BinarySignedDemo extends java.lang.Object
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:
iaik_cms.jar
(IAIK-CMS/SMIME)
iaik_jce(_full).jar
(IAIK-JCE Core Crypto Library).
SignedContent
,
BinaryCanonicalizer
Constructor and Description |
---|
BinarySignedDemo()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
jakarta.mail.Message |
createSignedMessage(jakarta.mail.Session session,
jakarta.activation.DataHandler dataHandler)
Creates a signed message.
|
static void |
main(java.lang.String[] argv)
The main method.
|
void |
start()
Starts the demo.
|
public BinarySignedDemo()
public void start() throws java.io.IOException
java.io.IOException
- if an I/O related error occurspublic jakarta.mail.Message createSignedMessage(jakarta.mail.Session session, jakarta.activation.DataHandler dataHandler) throws jakarta.mail.MessagingException
session
- the mail sessiondataHandler
- the content of the message to be signedjakarta.mail.MessagingException
- if an error occurs when creating the messagepublic static void main(java.lang.String[] argv) throws java.io.IOException
java.io.IOException