public class IdentityInfo extends java.lang.Object
Constructor | Description |
---|---|
IdentityInfo(java.io.File privateKey) |
Constructs an identity info with private key.
|
IdentityInfo(java.io.File privateKey,
byte[] passPhrase) |
Constructs an identity info with private key and its passphrase.
|
IdentityInfo(java.io.File privateKey,
java.io.File publicKey,
byte[] passPhrase) |
Constructs an identity info with private and public key and passphrase for the private key.
|
Modifier and Type | Method | Description |
---|---|---|
byte[] |
getPassPhrase() |
Get the passphrase of the private key.
|
java.io.File |
getPrivateKey() |
Get the file with the private key.
|
java.io.File |
getPublicKey() |
Get the file with the public key.
|
public IdentityInfo(java.io.File privateKey)
The key is not passphrase protected.
We use java.io.File because JSch cannot deal with VFS FileObjects.
privateKey
- The file with the private keypublic IdentityInfo(java.io.File privateKey, byte[] passPhrase)
We use java.io.File because JSch cannot deal with VFS FileObjects.
privateKey
- The file with the private keypassPhrase
- The passphrase to decrypt the private key (can be null
if no passphrase is used)public IdentityInfo(java.io.File privateKey, java.io.File publicKey, byte[] passPhrase)
We use java.io.File because JSch cannot deal with VFS FileObjects.
privateKey
- The file with the private keypublicKey
- The public key part used for connections with exchange of certificates (can be null
)passPhrase
- The passphrase to decrypt the private key (can be null
if no passphrase is used)public java.io.File getPrivateKey()
public java.io.File getPublicKey()
public byte[] getPassPhrase()