|
VideoTools
|
A helper class used by the md5::digest implementation to represent a 64-character data block. More...
#include <md5.h>
Public Member Functions | |
| block (const string_type &s, small_t block_offset, big_t end_value) | |
| Constructor. More... | |
| big_t | X (small_t) const |
| Returns a value from within the block. See RFC 1321. | |
Static Public Member Functions | |
| static big_t | end (small_t data_length) |
| Takes the total number of bytes in the input message and returns a value which can be passed to the constructor's third parameter. More... | |
| static small_t | blocks (small_t data_length) |
| Takes the total number of bytes in the input message and returns the number of 64-byte blocks, allowing for padding. More... | |
A helper class used by the md5::digest implementation to represent a 64-character data block.
| md5::block::block | ( | const string_type & | s, |
| small_t | block_offset, | ||
| big_t | end_value | ||
| ) |
Constructor.
Unusually, the string reference is kept, so beware of binding temporaries.
The 'block-offset' indicates, in units of 64-character blocks, how far down 's' the current block's data is.
The string must hold at least 64 bytes beyond the 'block-offset' point, except for the last block in a message sequence. Note that this is the number of blocks, not the number of bytes.
The 'end-value' is derived from the length of the full message (not just the current block). It is only used for the last block. See end().
|
static |
|
static |