C# Class dlech.SshAgentLib.BlobParser

used to parse open-ssh blobs
Show file Open project: dlech/SshAgentLib Class Usage Examples

Public Methods

Method Description
BlobParser ( Stream stream ) : System
BlobParser ( byte blob ) : System
ReadBits ( UInt32 bitCount ) : byte[]
ReadBlob ( ) : byte[]
ReadByte ( ) : byte
ReadBytes ( UInt32 blobLength ) : byte[]
ReadHeader ( ) : Agent.BlobHeader
ReadInt ( ) : UInt32
ReadShort ( ) : UInt16
ReadSsh1BigIntBlob ( ) : byte[]
ReadSsh1KeyData ( AsymmetricKeyParameter publicKeyParameter ) : AsymmetricCipherKeyPair

reads private key portion of OpenSSH ssh1 formatted key blob from stream and creates a key pair

intended to be called immediately after ParseSsh1PublicKeyData

ReadSsh1PublicKeyData ( bool reverseRsaParameters = false ) : AsymmetricKeyParameter

reads ssh1 OpenSSH formatted public key blob from stream and creates an AsymmetricKeyParameter object

ReadSsh2KeyData ( AsymmetricKeyParameter publicKeyParameter ) : AsymmetricCipherKeyPair

reads private key portion of OpenSSH formatted key blob from stream and creates a key pair

intended to be called immediately after ParseSsh2PublicKeyData

ReadSsh2PublicKeyData ( ) : AsymmetricKeyParameter

reads OpenSSH formatted public key blob and creates an AsymmetricKeyParameter object

ReadString ( ) : string

Method Details

BlobParser() public method

public BlobParser ( Stream stream ) : System
stream Stream
return System

BlobParser() public method

public BlobParser ( byte blob ) : System
blob byte
return System

ReadBits() public method

public ReadBits ( UInt32 bitCount ) : byte[]
bitCount System.UInt32
return byte[]

ReadBlob() public method

public ReadBlob ( ) : byte[]
return byte[]

ReadByte() public method

public ReadByte ( ) : byte
return byte

ReadBytes() public method

public ReadBytes ( UInt32 blobLength ) : byte[]
blobLength System.UInt32
return byte[]

ReadHeader() public method

public ReadHeader ( ) : Agent.BlobHeader
return Agent.BlobHeader

ReadInt() public method

public ReadInt ( ) : UInt32
return System.UInt32

ReadShort() public method

public ReadShort ( ) : UInt16
return System.UInt16

ReadSsh1BigIntBlob() public method

public ReadSsh1BigIntBlob ( ) : byte[]
return byte[]

ReadSsh1KeyData() public method

reads private key portion of OpenSSH ssh1 formatted key blob from stream and creates a key pair
intended to be called immediately after ParseSsh1PublicKeyData
public ReadSsh1KeyData ( AsymmetricKeyParameter publicKeyParameter ) : AsymmetricCipherKeyPair
publicKeyParameter Org.BouncyCastle.Crypto.AsymmetricKeyParameter
return Org.BouncyCastle.Crypto.AsymmetricCipherKeyPair

ReadSsh1PublicKeyData() public method

reads ssh1 OpenSSH formatted public key blob from stream and creates an AsymmetricKeyParameter object
public ReadSsh1PublicKeyData ( bool reverseRsaParameters = false ) : AsymmetricKeyParameter
reverseRsaParameters bool /// Set to true to read RSA modulus first. Normally exponent is read first. ///
return Org.BouncyCastle.Crypto.AsymmetricKeyParameter

ReadSsh2KeyData() public method

reads private key portion of OpenSSH formatted key blob from stream and creates a key pair
intended to be called immediately after ParseSsh2PublicKeyData
public ReadSsh2KeyData ( AsymmetricKeyParameter publicKeyParameter ) : AsymmetricCipherKeyPair
publicKeyParameter Org.BouncyCastle.Crypto.AsymmetricKeyParameter
return Org.BouncyCastle.Crypto.AsymmetricCipherKeyPair

ReadSsh2PublicKeyData() public method

reads OpenSSH formatted public key blob and creates an AsymmetricKeyParameter object
public ReadSsh2PublicKeyData ( ) : AsymmetricKeyParameter
return Org.BouncyCastle.Crypto.AsymmetricKeyParameter

ReadString() public method

public ReadString ( ) : string
return string