Class IdentityInfo
java.lang.Object
org.apache.commons.vfs2.provider.sftp.IdentityInfo
- All Implemented Interfaces:
- IdentityProvider
Structure for an identity based on Files.
- Since:
- 2.1
- 
Constructor SummaryConstructorsConstructorDescriptionIdentityInfo(File privateKey) Constructs an identity info with private key.IdentityInfo(File privateKey, byte[] passphrase) Constructs an identity info with private key and its passphrase.IdentityInfo(File privateKey, File 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 of the private key.byte[]Deprecated.Gets the file with the private key.Gets the file with the public key.inthashCode()
- 
Constructor Details- 
IdentityInfoConstructs an identity info with private key.The key is not passphrase protected. We use java.io.File because JSch cannot deal with VFS FileObjects. - Parameters:
- privateKey- The file with the private key
- Since:
- 2.1
 
- 
IdentityInfoConstructs an identity info with private key and its passphrase.We use java.io.File because JSch cannot deal with VFS FileObjects. - Parameters:
- privateKey- The file with the private key
- passphrase- The passphrase to decrypt the private key (can be- nullif no passphrase is used)
- Since:
- 2.1
 
- 
IdentityInfoConstructs an identity info with private and public key and passphrase for the private key.We use java.io.File because JSch cannot deal with VFS FileObjects. - Parameters:
- privateKey- The file with the private key
- 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)
- Since:
- 2.1
 
 
- 
- 
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.
- Since:
- 2.4
 
- 
equals
- 
getPassphraseGets the passphrase of the private key.- Returns:
- the passphrase
- Since:
- 2.10.0
 
- 
getPassPhraseDeprecated.UsegetPassphrase().Gets the passphrase of the private key.- Returns:
- the passphrase
- Since:
- 2.1
 
- 
getPrivateKeyGets the file with the private key.- Returns:
- the file
- Since:
- 2.1
 
- 
getPublicKeyGets the file with the public key.- Returns:
- the file
- Since:
- 2.1
 
- 
hashCode
 
- 
getPassphrase().