C# Класс Incog.Tools.ChannelTools

A collection of tools for covert channels.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
DecodeString ( byte message ) : string

Decode a string from a covert channel by removing the leading and trailing control characters.

EncodeString ( string message ) : byte[]

Encode a string for inclusion in a covert channel by adding a leading and trailing control characters.

MathSetLinear ( uint minimum, uint length ) : uint[]

Get a mathematical set of linear values starting a minimum value. For example, if the minimum is 5 and the length is 5, the resulting set would be: { 5, 6, 7, 8, 9 }

MathSetRandom ( uint minimum, uint maximum ) : uint[]

Get a mathematical set of non-repeating random values between a minimum and maximum. For example, if the minimum is 1, the maximum is 10, and the length is 5, the resulting set would be: { 1, 5, 9, 4, 2 }

MathSetRandom ( uint minimum, uint maximum, uint length ) : uint[]

Get a mathematical set of non-repeating random values between a minimum and maximum. For example, if the minimum is 1, the maximum is 10, and the length is 5, the resulting set would be: { 1, 5, 9, 4, 2 }

MathSetSieveOfEratosthenes ( uint minimum, uint maximum, uint length ) : uint[]

Get a mathematical set of prime numbers using the Sieve of Eratosthenes algorithm.

Приватные методы

Метод Описание
SafeConvertToInt ( uint value ) : int

Convert a unsigned integer to an integer without an System.OverflowException. If the unsigned integer is greater than integer's maximum value, then the resulting integer is maximum value.

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

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

Decode a string from a covert channel by removing the leading and trailing control characters.
public static DecodeString ( byte message ) : string
message byte The message string that will was sent.
Результат string

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

Encode a string for inclusion in a covert channel by adding a leading and trailing control characters.
public static EncodeString ( string message ) : byte[]
message string The message string that will be sent.
Результат byte[]

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

Get a mathematical set of linear values starting a minimum value. For example, if the minimum is 5 and the length is 5, the resulting set would be: { 5, 6, 7, 8, 9 }
public static MathSetLinear ( uint minimum, uint length ) : uint[]
minimum uint The first number in the set.
length uint The total array length of the resulting set.
Результат uint[]

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

Get a mathematical set of non-repeating random values between a minimum and maximum. For example, if the minimum is 1, the maximum is 10, and the length is 5, the resulting set would be: { 1, 5, 9, 4, 2 }
public static MathSetRandom ( uint minimum, uint maximum ) : uint[]
minimum uint The minimum value in the set. No values returned will be lower than this value.
maximum uint The maximum value in the set. No values returned will be higher than this value.
Результат uint[]

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

Get a mathematical set of non-repeating random values between a minimum and maximum. For example, if the minimum is 1, the maximum is 10, and the length is 5, the resulting set would be: { 1, 5, 9, 4, 2 }
public static MathSetRandom ( uint minimum, uint maximum, uint length ) : uint[]
minimum uint The minimum value in the set. No values returned will be lower than this value.
maximum uint The maximum value in the set. No values returned will be higher than this value.
length uint The total array length of the resulting set.
Результат uint[]

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

Get a mathematical set of prime numbers using the Sieve of Eratosthenes algorithm.
public static MathSetSieveOfEratosthenes ( uint minimum, uint maximum, uint length ) : uint[]
minimum uint The minimum value in the set. No values returned will be lower than this value.
maximum uint The maximum value in the set. No values returned will be higher than this value.
length uint The total array length of the resulting set.
Результат uint[]