コード例 #1
0
        /// <exception cref="NSch.JSchException"></exception>
        public virtual void AddIdentity(string name, byte[] prvkey, byte[] pubkey, byte[]
                                        passphrase)
        {
            Identity identity = IdentityFile.NewInstance(name, prvkey, pubkey, this);

            AddIdentity(identity, passphrase);
        }
コード例 #2
0
 public override bool Equals(object o)
 {
     if (!(o is NSch.IdentityFile))
     {
         return(base.Equals(o));
     }
     NSch.IdentityFile foo = (NSch.IdentityFile)o;
     return(GetName().Equals(foo.GetName()));
 }
コード例 #3
0
 public virtual bool Add(byte[] identity)
 {
     lock (this)
     {
         try
         {
             Identity _identity = IdentityFile.NewInstance("from remote:", identity, null, jsch
                                                           );
             identities.Add(_identity);
             return(true);
         }
         catch (JSchException)
         {
             return(false);
         }
     }
 }
コード例 #4
0
        /// <exception cref="NSch.JSchException"></exception>
        public virtual void AddIdentity(string prvkey, byte[] passphrase)
        {
            Identity identity = IdentityFile.NewInstance(prvkey, null, this);

            AddIdentity(identity, passphrase);
        }