Return TypeFunction nameArguments
hzEcodehzMD5::CalcMD5(const hzChain&,)

Declared in file: hzCodec.h
Defined in file : hzCodec.cpp

Function Logic:

0:START 1:!this 2:hzexit hzChain::Size 3:!Z.Size() 4:Return E_NODATA 5:zi nBytes buf 6:; 7:hzChain::Iter::Write nBytes 8:!nBytes 9:zi _xlate_md5 10:_xlate_md5 []buf 11:Return E_OK

Function body:

hzEcode hzMD5::CalcMD5 (const hzChain& Z)
{
   _hzfunc("hzMD5::CalcMD5(hzChain)") ;
   _md5_unit   md5Unit ;
   chIter      zi ;
   uchar*      buf ;
   uint32_t    nBytes ;
   if (!this)
       hzexit(E_CORRUPT, "No instance") ;
   if (!Z.Size())
       return E_NODATA ;
   zi = Z ;
   nBytes = 0;
   buf = new uchar[8196];
   for (;;)
   {
       nBytes = zi.Write(buf, 4096);
       if (!nBytes)
           break ;
       zi += nBytes ;
       _xlate_md5(buf, nBytes, 0,md5Unit) ;
   }
   _xlate_md5(buf, nBytes, (uchar*) m_Parts, md5Unit) ;
   delete [] buf ;
   return E_OK ;
}