Class BytesIdentityInfo
- java.lang.Object
-
- org.apache.commons.vfs2.provider.sftp.BytesIdentityInfo
-
- All Implemented Interfaces:
IdentityProvider
public class BytesIdentityInfo extends java.lang.Object implements IdentityProvider
Structure for an identity based on byte arrays.- Since:
- 2.4
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
passPhrase
private byte[]
privateKey
private byte[]
publicKey
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addIdentity(com.jcraft.jsch.JSch jsch)
byte[]
getPassPhrase()
byte[]
getPrivateKeyBytes()
byte[]
getPublicKeyBytes()
-
-
-
Constructor Detail
-
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 benull
if 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 benull
if no passphrase is used)
-
-
Method Detail
-
addIdentity
public void addIdentity(com.jcraft.jsch.JSch jsch) throws com.jcraft.jsch.JSchException
- Specified by:
addIdentity
in interfaceIdentityProvider
- Throws:
com.jcraft.jsch.JSchException
-
getPassPhrase
public byte[] getPassPhrase()
-
getPrivateKeyBytes
public byte[] getPrivateKeyBytes()
-
getPublicKeyBytes
public byte[] getPublicKeyBytes()
-
-