C# 클래스 Incog.Messaging.IncogStream

Incog Pipe Stream defines the data protocol for reading and writing strings on our stream.
파일 보기 프로젝트 열기: SimWitty/Incog 1 사용 예제들

공개 메소드들

메소드 설명
IncogStream ( Stream stream, SecureString passphrase ) : System

Initializes a new instance of the IncogStream class.

IncogStream ( Stream stream, SecureString passphrase, double entropy ) : System

Initializes a new instance of the IncogStream class.

ReadBytes ( ) : byte[]

Read a byte array from the underlying stream.

ReadString ( ) : string

Read a string from the underlying stream.

WriteBytes ( byte bytes ) : int

Write a byte array to the underlying buffer.

WriteString ( string text ) : int

Write a string to the underlying buffer.

비공개 메소드들

메소드 설명
ReadUInt16 ( ) : ushort

Read a 2-byte unsigned integer, unencrypted, from the stream. If either the first or second byte is missing (-1), then 0 is returned.

WriteUInt16 ( ushort value ) : void

Write a 2-byte unsigned integer, unencrypted, to the stream.

메소드 상세

IncogStream() 공개 메소드

Initializes a new instance of the IncogStream class.
public IncogStream ( Stream stream, SecureString passphrase ) : System
stream Stream The stream to write to and read from.
passphrase System.Security.SecureString The secure string used to encrypt messages written to the stream and decrypt messages read from the stream.
리턴 System

IncogStream() 공개 메소드

Initializes a new instance of the IncogStream class.
public IncogStream ( Stream stream, SecureString passphrase, double entropy ) : System
stream Stream The stream to write to and read from.
passphrase System.Security.SecureString The secure string used to encrypt messages written to the stream and decrypt messages read from the stream.
entropy double The approximate Shannon Entropy value (between 1.00 and 7.80) to spoof.
리턴 System

ReadBytes() 공개 메소드

Read a byte array from the underlying stream.
public ReadBytes ( ) : byte[]
리턴 byte[]

ReadString() 공개 메소드

Read a string from the underlying stream.
public ReadString ( ) : string
리턴 string

WriteBytes() 공개 메소드

Write a byte array to the underlying buffer.
public WriteBytes ( byte bytes ) : int
bytes byte The byte array to write to the buffer.
리턴 int

WriteString() 공개 메소드

Write a string to the underlying buffer.
public WriteString ( string text ) : int
text string The text string to write to the buffer. The string will be converted to Unicode.
리턴 int