examples
Class SignedDataExample
java.lang.Object
examples.SignedDataExample
public class SignedDataExample
- extends java.lang.Object
Demonstrates the creation of a value of ASN.1 type SignedData,
a Cryptographic Message Syntax (CMS) message type. In this example, ordinary
content is signed, then the signature on the content is verified.
The keytool is used with the following commands to create the
password protected key store and cryptographic keys needed to successfully
execute this example:
keytool -genkey -alias "rsaSelfSigned" -keyalg "RSA" -keysize 1024
-validity 365 -dname "CN=griffinconsulting-cName,
OU=griffinconsulting-orgUnit, O=griffinconsulting-org,
L=griffinconsulting-city, S=griffinconsulting-state,
C=US" -keypass griffin -storepass griffin -keystore src/cms.keys
keytool -genkey -alias "dsaSelfSigned" -keyalg "DSA" -keysize 1024
-validity 365 -dname "CN=griffinconsulting-cName,
OU=griffinconsulting-orgUnit, O=griffinconsulting-org,
L=griffinconsulting-city, S=griffinconsulting-state,
C=US" -keypass griffin -storepass griffin -keystore src/cms.keys
- Version:
- 1.00 - 2006/02/28
- Author:
- support@phillipgriffin.com
|
Method Summary |
static void |
main(java.lang.String[] args)
Main allows this class to be run as an application
from the command line. |
void |
showBinary()
|
void |
showXML()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SignedDataExample
public SignedDataExample()
- Default constructor for
SignedDataExample.
showXML
public void showXML()
throws java.lang.Exception
- Throws:
java.lang.Exception
showBinary
public void showBinary()
throws java.lang.Exception
- Throws:
java.lang.Exception
main
public static void main(java.lang.String[] args)
- Main allows this class to be run as an application
from the command line. Note that any command line
arguments are ignored.
- Parameters:
args - command line arguments (not used).
Copyright © 2005-2006 GRIFFIN Consulting. All Rights Reserved.