C# Class dlech.SshAgentLib.KeyFormatter

Inheritance: IFormatter
Mostrar archivo Open project: dlech/SshAgentLib Class Usage Examples

Public Methods

Method Description
Deserialize ( byte aBytes ) : ISshKey

Parse byte[] containing SSH key data

Deserialize ( Stream aStream ) : object

Parse stream containing SSH key data

DeserializeFile ( string fileName ) : ISshKey

Read file containing SSH key data

GetComment ( IEnumerable publicKeyFileLines, string defaultValue = null ) : string
GetFormatter ( string firstLine ) : KeyFormatter

Attempts to return a Formatter that can deserialize data given the specified first line

Serialize ( Stream aStream, object aObject ) : void

Serialize ISshKey to stream

SerializeToFile ( ISshKey aKey, string aFileName ) : void

Serialize ISshKey to file

Method Details

Deserialize() public method

Parse byte[] containing SSH key data
/// GetPassphraseCallbackMethod is null and aStream constrains encrypted key ///
public Deserialize ( byte aBytes ) : ISshKey
aBytes byte byte[] containing SSH key data
return ISshKey

Deserialize() public abstract method

Parse stream containing SSH key data
/// GetPassphraseCallbackMethod is null and aStream constrains encrypted key ///
public abstract Deserialize ( Stream aStream ) : object
aStream Stream stream containing SSH key data
return object

DeserializeFile() public method

Read file containing SSH key data
/// GetPassphraseCallbackMethod is null and aStream constrains encrypted key ///
public DeserializeFile ( string fileName ) : ISshKey
fileName string file containing SSH key data
return ISshKey

GetComment() public static method

public static GetComment ( IEnumerable publicKeyFileLines, string defaultValue = null ) : string
publicKeyFileLines IEnumerable
defaultValue string
return string

GetFormatter() public static method

Attempts to return a Formatter that can deserialize data given the specified first line
/// The file format was not recognized ///
public static GetFormatter ( string firstLine ) : KeyFormatter
firstLine string first line of data to be deserialized
return KeyFormatter

Serialize() public abstract method

Serialize ISshKey to stream
public abstract Serialize ( Stream aStream, object aObject ) : void
aStream Stream target stream
aObject object ISshKey object
return void

SerializeToFile() public method

Serialize ISshKey to file
public SerializeToFile ( ISshKey aKey, string aFileName ) : void
aKey ISshKey the key to serialize
aFileName string target file
return void