C# Class dlech.SshAgentLib.Agent

Implements OpenSSH Agent
Inheriting classes should implement the platform specific communication to get a message from a client and then call AnswerMessage method
Inheritance: IAgent, IDisposable
Show file Open project: dlech/SshAgentLib Class Usage Examples

Public Methods

Method Description
AddKey ( ISshKey key ) : void
AnswerMessage ( Stream messageStream, Process process = null ) : void

Answers the message.

code based on winpgnt.c from PuTTY source code

Dispose ( ) : void
ListKeys ( SshVersion aVersion ) : ICollection
Lock ( byte aPassphrase ) : void
RemoveAllKeys ( SshVersion aVersion ) : void
RemoveKey ( ISshKey key ) : void
Unlock ( byte aPassphrase ) : void

Protected Methods

Method Description
Agent ( ) : System

Private Methods

Method Description
FireKeyAdded ( ISshKey key ) : void
FireKeyRemoved ( ISshKey key ) : void
FireLocked ( ) : void

Fires lock event for listeners

Method Details

AddKey() public method

public AddKey ( ISshKey key ) : void
key ISshKey
return void

Agent() protected method

protected Agent ( ) : System
return System

AnswerMessage() public method

Answers the message.
code based on winpgnt.c from PuTTY source code
public AnswerMessage ( Stream messageStream, Process process = null ) : void
messageStream Stream Message stream.
process System.Diagnostics.Process The calling process or null if the process /// could not be obtained.
return void

Dispose() public abstract method

public abstract Dispose ( ) : void
return void

ListKeys() public method

public ListKeys ( SshVersion aVersion ) : ICollection
aVersion SshVersion
return ICollection

Lock() public method

public Lock ( byte aPassphrase ) : void
aPassphrase byte
return void

RemoveAllKeys() public method

public RemoveAllKeys ( SshVersion aVersion ) : void
aVersion SshVersion
return void

RemoveKey() public method

public RemoveKey ( ISshKey key ) : void
key ISshKey
return void

Unlock() public method

public Unlock ( byte aPassphrase ) : void
aPassphrase byte
return void