|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tribble.security.KeyReader
Public/private encryption key reader.
Provides the capability of reading public or private encryption keys contained
in XML text files that were generated by class GenKeyPair
.
Note that this is not a full-fledged XML parser, but rather an extemely simplified scanner that assumes that the XML input text is in a particular format. Input XML text that deviates too far from the assumed format will not be parsed correctly.
main(java.lang.String[])
,
GenKeyPair
Constructor Summary | |
KeyReader(java.io.Reader in)
Constructor. |
Method Summary | |
void |
close()
Close the input stream. |
static void |
main(java.lang.String[] args)
Read one or more XML keyfiles and display information about the public or private encryption keys. |
java.security.Key |
readKey()
Read a public or private encryption key from the XML input stream of this key reader. |
java.security.Key |
readKey(java.lang.String passphrase)
Read a public or private encryption key from the XML input stream of this key reader. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public KeyReader(java.io.Reader in)
in
- Input stream, from which XML encryption keys are to be read.Method Detail |
public static void main(java.lang.String[] args) throws java.io.IOException, java.security.GeneralSecurityException
Usage
java tribble.security.KeyReader [option...] keyfile.xml ...
Options:
java.io.IOException
java.security.GeneralSecurityException
public void close() throws java.io.IOException
java.io.IOException
- Thrown if an I/O (read) error occurs.public java.security.Key readKey() throws java.io.IOException, java.security.GeneralSecurityException
Note that this is not a full-fledged XML parser, but rather an extemely simplified scanner that assumes that the XML input text is in a particular format. Input XML text that deviates too far from the assumed format will not be parsed correctly.
java.io.IOException
- Thrown if an I/O (read) error occurs.
java.security.GeneralSecurityException
public java.security.Key readKey(java.lang.String passphrase) throws java.io.IOException, java.security.GeneralSecurityException
Note that this is not a full-fledged XML parser, but rather an extemely simplified scanner that assumes that the XML input text is in a particular format. Input XML text that deviates too far from the assumed format will not be parsed correctly.
passphrase
- Passphrase to use to decrypt private keys.
java.io.IOException
- Thrown if an I/O (read) error occurs.
java.security.GeneralSecurityException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |