Whisper Library
|
Converts the message into bit-blocks and reassembles them to a message (used by TcpHeaderCovertChannel) More...
Public Member Functions | |
size_t | blockLength () |
vector< bitset< BLOCK_LENGTH > > | encodeMessage (string message) |
encodeMessage takes a string and splits it into parts. More... | |
string | decodeMessage (vector< bitset< BLOCK_LENGTH > > vector) |
Converts the message into bit-blocks and reassembles them to a message (used by TcpHeaderCovertChannel)
To use this class, call the function 'encodeMessage' with the message as a string or 'decodeMessage' with the message-blocks in a vector.
BLOCK_LENGTH | sets the length of the bit-blocks. |
|
inline |
Returns the size of a message block.
|
inline |
decodeMessage takes bit blocks and converts them to characters returned as a string.
vector | a vector of bitsets with the bitsets containing the binary representation of ASCII-encoded letters. |
|
inline |
encodeMessage takes a string and splits it into parts.
These are returned as a vector of bitsets in order. If you can't divide the bit count by BLOCK_LENGTH, the last bits are filled up with 0's. The bitsets contain the binary representation of ASCI-encoded letters.
message | the message to be encoded |