KeccakTools

MessageBlock Class Reference

#include <padding.h>

List of all members.

Public Member Functions

 MessageBlock ()
void appendBit (int bitValue)
void appendByte (UINT8 byteValue)
void appendZeroes (unsigned int count)
unsigned int size () const
const vector< UINT8 > & get () const

Detailed Description

Class representing a message block whose size is not necessarily a multiple of 8 bits. The block can contain any number of bits.


Constructor & Destructor Documentation

MessageBlock::MessageBlock ( )

The constructor.


Member Function Documentation

void MessageBlock::appendBit ( int  bitValue)

Method to append one bit to the block.

Parameters:
bitValueThe value (0 or 1) of the bit to append.
void MessageBlock::appendByte ( UINT8  byteValue)

Method to append one byte to the block.

Parameters:
byteValueThe value (0x00…0xFF) of the byte to append.
void MessageBlock::appendZeroes ( unsigned int  count)

Method to append a series of bits with value '0'.

Parameters:
countThe number of zeroes to append.
const vector< UINT8 > & MessageBlock::get ( ) const

Method that returns a reference to the block.

Returns:
A constant reference to the block represented as a vector of bytes. If the number of bits is not a multiple of 8, the last byte contains the last few bits in its least significant bits.
unsigned int MessageBlock::size ( ) const

Method that returns the number of bits in the block.

Returns:
The number of bits in the block.

The documentation for this class was generated from the following files: