58 Digest() { words[0] = words[1] = 0; }
59 Digest(
const Digest © )
61 words[0] = copy.words[0];
62 words[1] = copy.words[1];
65 Digest &operator=(
const Digest © )
67 words[0] = copy.words[0];
68 words[1] = copy.words[1];
72 uint8_t& operator[](
size_t i ) {
return d[i]; }
73 uint8_t operator[](
size_t i )
const {
return d[i]; }
75 void print( std::ostream &ostr )
const
77 for (
int i = 0; i < 16; ++i )
79 ostr << std::setfill(
'0' ) << std::setw( 2 ) <<
80 std::hex << std::noshowbase << ( int ) d[i];
84 std::string str()
const
86 std::stringstream sstr;
94 bool operator==(
const Digest &iRhs )
const
96 return ( ( words[0] == iRhs.words[0] ) &&
97 ( words[1] == iRhs.words[1] ) );
100 bool operator<(
const Digest &iRhs )
const
102 return ( words[0] < iRhs.words[0] ?
true :
103 ( words[0] > iRhs.words[0] ?
false :
104 ( words[1] < iRhs.words[1] ) ) );