oln::utils::buffer Class Reference

Buffer used for MD5 data type abstraction. More...

#include <buffer.hh>

Collaboration diagram for oln::utils::buffer:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ntg::int_u32 value_type
 Used data type.

Public Member Functions

 buffer ()
 Initialization of data.
template<class E>
void add (const E &e, bool count=true)
 Add every bits of e in data.
void push_back (bool bit, bool is_padding=false)
 Push back a bit at the end of the buffer.
ntg::int_u32 operator[] (unsigned n) const
 Return the nth word.
void append_padding ()
 Append padding bits.
void append_length ()
 Append length.
unsigned size () const
 Return the number of words.
unsigned bit_len () const
 Return the length in bits.
bool is_append_padding () const
 Tell if the buffer has already been padded.
bool is_append_length () const
 Tell if the length has already been appended.
template<class E>
void add (const E &e, bool count)

Protected Member Functions

value_type reorder (value_type x) const
 Change order of data in a word.

Protected Attributes

unsigned char current_bit_
 Number of the current bit in the current word.
std::vector< value_typedata_
 The buffer data.
value_type len1_
 first word length
value_type len2_
 second word length
bool padding_appended_
 Status of padding.
bool length_appended_
 Status of length appending.

Static Protected Attributes

static const unsigned length_ = 100

Detailed Description

Buffer used for MD5 data type abstraction.

Definition at line 40 of file buffer.hh.


Member Function Documentation

template<class E>
void oln::utils::buffer::add ( const E &  e,
bool  count = true 
) [inline]

Add every bits of e in data.

Definition at line 169 of file buffer.hh.

void oln::utils::buffer::push_back ( bool  bit,
bool  is_padding = false 
) [inline]

Push back a bit at the end of the buffer.

true -> push back a 1
false -> push back a 0

Definition at line 183 of file buffer.hh.

Referenced by add().

buffer::value_type oln::utils::buffer::reorder ( value_type  x  )  const [inline, protected]

Change order of data in a word.

Definition at line 213 of file buffer.hh.


Member Data Documentation

const unsigned oln::utils::buffer::length_ = 100 [static, protected]

Capacity chunk.

Definition at line 113 of file buffer.hh.


The documentation for this class was generated from the following files:
Generated on Tue Feb 20 20:29:55 2007 for Olena by  doxygen 1.5.1