public class BytesIdentityInfo extends java.lang.Object implements IdentityProvider
Modifier and Type | Field and Description |
---|---|
private byte[] |
passPhrase |
private byte[] |
privateKey |
private byte[] |
publicKey |
Constructor and Description |
---|
BytesIdentityInfo(byte[] privateKey,
byte[] passPhrase)
Constructs an identity info with private and passphrase for the private key.
|
BytesIdentityInfo(byte[] privateKey,
byte[] publicKey,
byte[] passPhrase)
Constructs an identity info with private and public key and passphrase for the private key.
|
Modifier and Type | Method and Description |
---|---|
void |
addIdentity(com.jcraft.jsch.JSch jsch) |
byte[] |
getPassPhrase() |
byte[] |
getPrivateKeyBytes() |
byte[] |
getPublicKeyBytes() |
private final byte[] passPhrase
private final byte[] privateKey
private final byte[] publicKey
public BytesIdentityInfo(byte[] privateKey, byte[] passPhrase)
privateKey
- Private key bytespassPhrase
- The passphrase to decrypt the private key (can be null
if no passphrase is used)public BytesIdentityInfo(byte[] privateKey, byte[] publicKey, byte[] passPhrase)
privateKey
- Private key bytespublicKey
- 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 void addIdentity(com.jcraft.jsch.JSch jsch) throws com.jcraft.jsch.JSchException
addIdentity
in interface IdentityProvider
com.jcraft.jsch.JSchException
public byte[] getPassPhrase()
public byte[] getPrivateKeyBytes()
public byte[] getPublicKeyBytes()