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
- 
Constructor SummaryConstructorsConstructorDescriptionBytesIdentityInfo(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 SummaryModifier and TypeMethodDescriptionvoidaddIdentity(com.jcraft.jsch.JSch jsch) Add this identity to the given JSch.booleanbyte[]Gets the passphrase.byte[]Deprecated.byte[]Gets the private key.byte[]Gets the public key.inthashCode()
- 
Constructor Details- 
BytesIdentityInfoConstructs an identity info with private and passphrase for the private key.- Parameters:
- privateKey- Private key bytes
- passphrase- The passphrase to decrypt the private key (can be- nullif no passphrase is used)
 
- 
BytesIdentityInfoConstructs an identity info with private and public key and passphrase for the private key.- Parameters:
- privateKey- Private key bytes
- publicKey- The public key part used for connections with exchange of certificates (can be- null)
- passphrase- The passphrase to decrypt the private key (can be- nullif no passphrase is used)
 
 
- 
- 
Method Details- 
addIdentityDescription copied from interface:IdentityProviderAdd this identity to the given JSch.- Specified by:
- addIdentityin interface- IdentityProvider
- Parameters:
- jsch- Target JSch.
- Throws:
- com.jcraft.jsch.JSchException- If I/O error occurs.
 
- 
equals
- 
getPassphraseGets the passphrase.- Returns:
- the passphrase.
- Since:
- 2.10.0
 
- 
getPassPhraseDeprecated.UsegetPassphrase().Gets the passphrase.- Returns:
- the passphrase.
 
- 
getPrivateKeyBytesGets the private key.- Returns:
- the private key.
 
- 
getPublicKeyBytesGets the public key.- Returns:
- the public key.
 
- 
hashCode
 
- 
getPassphrase().