C# Class Granados.Poderosa.KeyFormat.PuTTYPrivateKeyLoader

PuTTY SSH2 private key loader
Inheritance: ISSH2PrivateKeyLoader
Show file Open project: poderosaproject/poderosa Class Usage Examples

Public Methods

Method Description
Load ( string passphrase, KeyPair &keyPair, string &comment ) : void

Read PuTTY SSH2 private key parameters.

PuTTYPrivateKeyLoader ( byte keyFile, string keyFilePath ) : System

Constructor

Private Methods

Method Description
BinToHex ( byte data ) : string
GetStreamReader ( ) : StreamReader
GetValueOf ( string line ) : string
PuTTYPassphraseToKey ( string passphrase ) : byte[]
ReadBlob ( StreamReader sreader, int lines, byte &blob ) : void
ReadHeaderLine ( StreamReader sreader, int &version, string &keyTypeName ) : void
ReadItemLine ( StreamReader sreader, string itemName, string &itemValue ) : void
ReadPrivateMACLine ( StreamReader sreader, int version, string &privateMac, string &privateHash ) : void
Verify ( int version, string privateMac, string privateHash, string passphrase, string keyTypeName, string encryptionName, string comment, byte publicBlob, byte privateBlob ) : bool
WriteMacData ( MemoryStream mem, byte data ) : void
WriteMacData ( MemoryStream mem, string s ) : void

Method Details

Load() public method

Read PuTTY SSH2 private key parameters.
public Load ( string passphrase, KeyPair &keyPair, string &comment ) : void
passphrase string passphrase for decrypt the key file
keyPair Granados.PKI.KeyPair key pair
comment string comment or empty if it didn't exist
return void

PuTTYPrivateKeyLoader() public method

Constructor
public PuTTYPrivateKeyLoader ( byte keyFile, string keyFilePath ) : System
keyFile byte key file data
keyFilePath string Path of a key file
return System