|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--demo.keystore.KeyStoreDemo
This demo shows the usage of a JCA compliant keystore.
Keys and certificates used for this demo are read from the IAIK-JCE sample keystore
("jce.keystore") file which may be created by running the SetupKeyStore
program.
The jce.keystore file has to be located in your current working directory.
Constructor Summary | |
KeyStoreDemo()
Default constructor. |
Method Summary | |
void |
createKeyStore(char[] password,
OutputStream os)
Creates a new IAIK keystore, adds two entries and writes the keystore to the given output stream. |
static void |
main(String[] argv)
Main method. |
void |
readKeyStore(char[] password,
InputStream is)
Reads the demo keystore from the given stream and parses its content. |
void |
start()
Starts the demo. |
void |
start(String fileName)
Starts the demo. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public KeyStoreDemo()
Method Detail |
public void createKeyStore(char[] password, OutputStream os) throws Exception
password
- the (keystore and key entry) passwordos
- the stream to which to write the keystore just createdException
- if some error occurspublic void readKeyStore(char[] password, InputStream is) throws Exception
password
- the (keystore and key entry) passwordis
- the stream from which to read the demo keystoreException
- if an error occurs while reading/parsing the keystorepublic void start()
public void start(String fileName)
fileName
- the name of the file to which to write (and then from where to read)
the demo keystore; if null
ByteArrayStreams are usedpublic static void main(String[] argv)
|
This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |