examples
Class ExampleKeyStore
java.lang.Object
examples.ExampleKeyStore
public class ExampleKeyStore
- extends java.lang.Object
Provides a simple example password protected key store.
The keytool is used with the following commands to create the
password protected key store and cryptographic keys needed to successfully
use this class:
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/22
- Author:
- support@phillipgriffin.com
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExampleKeyStore
public ExampleKeyStore()
throws CryptoException
- Throws:
CryptoException
getRsaPublicKey
public java.security.PublicKey getRsaPublicKey()
throws java.security.KeyStoreException
- Throws:
java.security.KeyStoreException
getRsaCertificate
public java.security.cert.Certificate getRsaCertificate()
throws java.security.KeyStoreException
- Throws:
java.security.KeyStoreException
getRsaPrivateKey
public java.security.PrivateKey getRsaPrivateKey()
throws java.security.KeyStoreException,
java.security.NoSuchAlgorithmException,
java.security.UnrecoverableKeyException
- Throws:
java.security.KeyStoreException
java.security.NoSuchAlgorithmException
java.security.UnrecoverableKeyException
getDsaPublicKey
public java.security.PublicKey getDsaPublicKey()
throws java.security.KeyStoreException
- Throws:
java.security.KeyStoreException
getDsaCertificate
public java.security.cert.Certificate getDsaCertificate()
throws java.security.KeyStoreException
- Throws:
java.security.KeyStoreException
getDsaPrivateKey
public java.security.PrivateKey getDsaPrivateKey()
throws java.security.KeyStoreException,
java.security.NoSuchAlgorithmException,
java.security.UnrecoverableKeyException
- Throws:
java.security.KeyStoreException
java.security.NoSuchAlgorithmException
java.security.UnrecoverableKeyException
Copyright © 2005-2006 GRIFFIN Consulting. All Rights Reserved.