Class BytesIdentityInfo
java.lang.Object
org.apache.commons.vfs2.provider.sftp.BytesIdentityInfo
- All Implemented Interfaces:
IdentityProvider
Structure for an identity based on byte arrays.
- Since:
- 2.4
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]private final byte[]private final byte[] -
Constructor Summary
ConstructorsConstructorDescriptionBytesIdentityInfo(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. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIdentity(com.jcraft.jsch.JSch jsch) byte[]byte[]byte[]
-
Field Details
-
passPhrase
private final byte[] passPhrase -
privateKey
private final byte[] privateKey -
publicKey
private final byte[] publicKey
-
-
Constructor Details
-
BytesIdentityInfo
public BytesIdentityInfo(byte[] privateKey, byte[] passPhrase) Constructs an identity info with private and passphrase for the private key.- Parameters:
privateKey- Private key bytespassPhrase- The passphrase to decrypt the private key (can benullif no passphrase is used)
-
BytesIdentityInfo
public BytesIdentityInfo(byte[] privateKey, byte[] publicKey, byte[] passPhrase) Constructs an identity info with private and public key and passphrase for the private key.- Parameters:
privateKey- Private key bytespublicKey- The public key part used for connections with exchange of certificates (can benull)passPhrase- The passphrase to decrypt the private key (can benullif no passphrase is used)
-
-
Method Details
-
addIdentity
public void addIdentity(com.jcraft.jsch.JSch jsch) throws com.jcraft.jsch.JSchException - Specified by:
addIdentityin interfaceIdentityProvider- Throws:
com.jcraft.jsch.JSchException
-
getPassPhrase
public byte[] getPassPhrase() -
getPrivateKeyBytes
public byte[] getPrivateKeyBytes() -
getPublicKeyBytes
public byte[] getPublicKeyBytes()
-