KeccakTools
|
#include <padding.h>
Public Member Functions | |
MessageQueue (unsigned int aBlockSize) | |
void | appendBit (int bitValue) |
void | appendByte (UINT8 byteValue) |
void | appendZeroes (unsigned int count) |
void | append (const UINT8 *input, unsigned int lengthInBits) |
unsigned int | lastBlockSize () const |
unsigned int | blockCount () const |
bool | firstBlockIsWhole () const |
const vector< UINT8 > & | firstBlock () const |
void | removeFirstBlock () |
void | clear () |
Class representing a sequence of fixed-size blocks, except the last one, whose size can be smaller.
MessageQueue::MessageQueue | ( | unsigned int | aBlockSize | ) |
The constructor.
aBlockSize | The desired block size in bits. |
void MessageQueue::append | ( | const UINT8 * | input, |
unsigned int | lengthInBits | ||
) |
Method to append a number of bits to the sequence.
input | Pointer to the bits to append. If the number of bits is not a multiple of 8, the last byte contains the last few bits in its least significant bits. |
lengthInBits | The number of bits to append. |
void MessageQueue::appendBit | ( | int | bitValue | ) |
Method to append one bit to the sequence.
bitValue | The value (0 or 1) of the bit to append. |
void MessageQueue::appendByte | ( | UINT8 | byteValue | ) |
Method to append one byte to the sequence.
byteValue | The value (0x00…0xFF) of the byte to append. |
void MessageQueue::appendZeroes | ( | unsigned int | count | ) |
Method to append a series of bits with value '0'.
count | The number of zeroes to append. |
unsigned int MessageQueue::blockCount | ( | ) | const |
Method that returns the number of blocks in the sequence.
void MessageQueue::clear | ( | ) |
Method to empty the sequence.
const vector< UINT8 > & MessageQueue::firstBlock | ( | ) | const |
Method that returns a reference to the first block of the sequence.
bool MessageQueue::firstBlockIsWhole | ( | ) | const |
Method that tells whether the first block has exactly blockSize bits.
unsigned int MessageQueue::lastBlockSize | ( | ) | const |
Method that returns the size of the last block.
void MessageQueue::removeFirstBlock | ( | ) |
Method that removes the first block of the sequence.