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
IOException
GeneralSecurityException
public static KeyPair loadKey(File f, String passwd) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
public static KeyPair loadKey(String pemString, String passwd) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
Copyright © 2016. All rights reserved.