C# Класс dlech.SshAgentLib.KeyFormatter

Наследование: IFormatter
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Описание методов

Deserialize() публичный Метод

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
Результат ISshKey

Deserialize() публичный абстрактный Метод

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
Результат object

DeserializeFile() публичный Метод

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
Результат ISshKey

GetComment() публичный статический Метод

public static GetComment ( IEnumerable publicKeyFileLines, string defaultValue = null ) : string
publicKeyFileLines IEnumerable
defaultValue string
Результат string

GetFormatter() публичный статический Метод

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
Результат KeyFormatter

Serialize() публичный абстрактный Метод

Serialize ISshKey to stream
public abstract Serialize ( Stream aStream, object aObject ) : void
aStream Stream target stream
aObject object ISshKey object
Результат void

SerializeToFile() публичный Метод

Serialize ISshKey to file
public SerializeToFile ( ISshKey aKey, string aFileName ) : void
aKey ISshKey the key to serialize
aFileName string target file
Результат void