reSIProcate/rutil  9694
Functions
testMD5Stream.cxx File Reference
#include "rutil/Data.hxx"
#include "rutil/MD5Stream.hxx"
#include "rutil/Log.hxx"
#include "assert.h"
Include dependency graph for testMD5Stream.cxx:

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( void  )

Definition at line 11 of file testMD5Stream.cxx.

References resip::MD5Stream::getHex(), and resip::Data::md5().

{
   {
      MD5Stream str;
      assert(str.getHex() == "d41d8cd98f00b204e9800998ecf8427e");
   }

   {
      MD5Stream str;
      str << "qwertyuiop";
      assert(str.getHex() == "6eea9b7ef19179a06954edd0f6c05ceb");
   }

   {
      MD5Stream str;
      Data data;

      for (int i = 0; i < 1000; ++i)
      {
         cerr << i << endl;
         str << i;
         data += Data(i);

         assert(str.getHex() == data.md5());
      }      
   }

   cerr << "All OK" << endl;

   return 0;
}

Here is the call graph for this function: