C# Class Incog.Messaging.TextMessage

Text messaging layer class for coordinating a message pipeline in channels such as DNS.
Exibir arquivo Open project: SimWitty/Incog

Public Methods

Method Description
Clear ( ) : void

Clear the message fragments, set Complete to False, and preserve the message identifier.

Get ( int index ) : byte[]

Gets the value of the Byte array at the specific position in the Fragments array.

GetBytes ( ) : byte[]

Returns the completed message as an array of Bytes.

GetDecryptedMessage ( System passphrase ) : string

Decrypts the fragments values of this instance into a clear text message string using the passphrase.

Set ( int index, byte value ) : void

Sets the Byte array at a specific position in the Fragments array to a specific value.

TextMessage ( ushort identifier ) : System

Initializes a new instance of the TextMessage class.

TextMessage ( ushort identifier, ushort fragmentCount ) : System

Initializes a new instance of the TextMessage class.

Method Details

Clear() public method

Clear the message fragments, set Complete to False, and preserve the message identifier.
public Clear ( ) : void
return void

Get() public method

Gets the value of the Byte array at the specific position in the Fragments array.
public Get ( int index ) : byte[]
index int The zero-based index of the Byte array fragment to get.
return byte[]

GetBytes() public method

Returns the completed message as an array of Bytes.
public GetBytes ( ) : byte[]
return byte[]

GetDecryptedMessage() public method

Decrypts the fragments values of this instance into a clear text message string using the passphrase.
public GetDecryptedMessage ( System passphrase ) : string
passphrase System Decryption key
return string

Set() public method

Sets the Byte array at a specific position in the Fragments array to a specific value.
public Set ( int index, byte value ) : void
index int The zero-based index of the byte array fragment to get.
value byte The Byte array value to assign to the fragment.
return void

TextMessage() public method

Initializes a new instance of the TextMessage class.
public TextMessage ( ushort identifier ) : System
identifier ushort The unique identifier number of the message.
return System

TextMessage() public method

Initializes a new instance of the TextMessage class.
public TextMessage ( ushort identifier, ushort fragmentCount ) : System
identifier ushort The unique identifier number of the message.
fragmentCount ushort The number of fragments in the message.
return System