maspack.fileutil.vfs
Class SimpleIdRepoFactory

java.lang.Object
  extended by maspack.fileutil.vfs.SimpleIdRepoFactory
All Implemented Interfaces:
org.apache.commons.vfs2.provider.sftp.IdentityRepositoryFactory

public class SimpleIdRepoFactory
extends java.lang.Object
implements org.apache.commons.vfs2.provider.sftp.IdentityRepositoryFactory

An "IdentityFactor" that stores a set of private keys to use for authentication.

Author:
"Antonio Sanchez" Creation date: 24 Oct 2012

Constructor Summary
SimpleIdRepoFactory()
           
 
Method Summary
 void addIdentity(com.jcraft.jsch.Identity id)
           
static void byteErase(byte[] array)
           
 com.jcraft.jsch.IdentityRepository create(com.jcraft.jsch.JSch jsch)
           
static IdentityFile createIdentity(byte[] blob)
           
static IdentityFile createIdentity(java.io.File file)
           
static IdentityFile createIdentity(java.lang.String fileName)
           
static boolean decryptIdentity(com.jcraft.jsch.Identity id, byte[] passphrase)
           
static boolean decryptIdentity(com.jcraft.jsch.Identity id, java.lang.String passphrase)
           
 com.jcraft.jsch.IdentityRepository getIdentityRepository()
           
 void setIdentityRepository(SimpleIdentityRepository repo)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleIdRepoFactory

public SimpleIdRepoFactory()
Method Detail

addIdentity

public void addIdentity(com.jcraft.jsch.Identity id)

byteErase

public static void byteErase(byte[] array)

decryptIdentity

public static boolean decryptIdentity(com.jcraft.jsch.Identity id,
                                      java.lang.String passphrase)

decryptIdentity

public static boolean decryptIdentity(com.jcraft.jsch.Identity id,
                                      byte[] passphrase)

createIdentity

public static IdentityFile createIdentity(byte[] blob)
                                   throws com.jcraft.jsch.JSchException
Throws:
com.jcraft.jsch.JSchException

createIdentity

public static IdentityFile createIdentity(java.lang.String fileName)
                                   throws com.jcraft.jsch.JSchException
Throws:
com.jcraft.jsch.JSchException

createIdentity

public static IdentityFile createIdentity(java.io.File file)
                                   throws com.jcraft.jsch.JSchException
Throws:
com.jcraft.jsch.JSchException

setIdentityRepository

public void setIdentityRepository(SimpleIdentityRepository repo)

getIdentityRepository

public com.jcraft.jsch.IdentityRepository getIdentityRepository()

create

public com.jcraft.jsch.IdentityRepository create(com.jcraft.jsch.JSch jsch)
Specified by:
create in interface org.apache.commons.vfs2.provider.sftp.IdentityRepositoryFactory