|
Secure iNet Factory | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jscape.inet.ssh.util.KeyPairAssembler
public class KeyPairAssembler
Key pair reader. Provides reading services for several key formats.
All methods throwNullPointerException if null-references were passed in arguments.
| Constructor Summary | |
|---|---|
KeyPairAssembler()
Creates a new assembler instance. |
|
| Method Summary | |
|---|---|
void |
addFormat(KeyPairFormat format)
Adds a new format to the reader. |
boolean |
containsFormat(KeyPairFormat format)
Check if format is already added. |
void |
removeFormat(KeyPairFormat format)
Removes format from the reader. |
java.security.KeyPair |
restoreKeyPair(byte[] data,
java.lang.String passphrase)
Restores key pair from the specified byte array. |
java.security.KeyPair |
restoreKeyPair(java.io.File file,
java.lang.String passphrase)
Reads key pair from the specified file. |
java.security.KeyPair |
restoreKeyPair(java.io.InputStream in,
java.lang.String passphrase)
Reads key pair from the specified input stream. |
java.security.KeyPair |
restoreKeyPair(java.lang.String key,
java.lang.String passphrase)
Reads key pair from the specified key string |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public KeyPairAssembler()
| Method Detail |
|---|
public boolean containsFormat(KeyPairFormat format)
format - target format
true if format is already added; false otherwisepublic void addFormat(KeyPairFormat format)
format - target format
java.lang.IllegalArgumentException - if format is already addedpublic void removeFormat(KeyPairFormat format)
format - target format
public java.security.KeyPair restoreKeyPair(byte[] data,
java.lang.String passphrase)
throws FormatException
data - key pair datapassphrase - passphrase
FormatException - if key pair cannot be restored
public java.security.KeyPair restoreKeyPair(java.io.InputStream in,
java.lang.String passphrase)
throws FormatException,
java.io.IOException
in - input streampassphrase - passphrase
FormatException - if key pair cannot be restored
java.io.IOException - if I/O error occurs
public java.security.KeyPair restoreKeyPair(java.io.File file,
java.lang.String passphrase)
throws FormatException,
java.io.IOException
file - key pair filepassphrase - passphrase
FormatException - if key pair cannot be restored
java.io.IOException - if I/O error occurs
public java.security.KeyPair restoreKeyPair(java.lang.String key,
java.lang.String passphrase)
throws FormatException
key - the private keypassphrase - the private key password
FormatException - if key pair cannot be restored
java.io.IOException - if I/O error occurs
|
Secure iNet Factory | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||