public class PrivateKeyProvider extends Object
| Constructor and Description |
|---|
PrivateKeyProvider() |
| Modifier and Type | Method and Description |
|---|---|
List<KeyPair> |
getKeys()
Get keys read so far.
|
boolean |
hasKeys() |
static KeyPair |
loadKey(File f,
String passwd) |
static KeyPair |
loadKey(String pemString,
String passwd) |
void |
readFrom(File keyFile)
Read key from keyFile.
|
boolean |
readFromDefaultLocations()
Read keys from default keyFiles
.ssh/id_rsa, .ssh/id_dsa and .ssh/identity.
|
public List<KeyPair> getKeys()
public boolean hasKeys()
public boolean readFromDefaultLocations()
public void readFrom(File keyFile) throws IOException, GeneralSecurityException
IOExceptionGeneralSecurityExceptionpublic static KeyPair loadKey(File f, String passwd) throws IOException, GeneralSecurityException
IOExceptionGeneralSecurityExceptionpublic static KeyPair loadKey(String pemString, String passwd) throws IOException, GeneralSecurityException
IOExceptionGeneralSecurityExceptionCopyright © 2004-2014. All Rights Reserved.