Lines Matching defs:wHashIdent
272 bool CAICHHashTree::CreatePartRecoveryData(uint64 nStartPos, uint64 nSize, CFileDataIO* fileDataOut, uint32 wHashIdent, bool b32BitIdent)
280 return WriteLowestLevelHashs(fileDataOut, wHashIdent, false, b32BitIdent);
286 wHashIdent <<= 1;
287 wHashIdent |= (m_bIsLeftBranch) ? 1: 0;
301 m_pRightTree->WriteHash(fileDataOut, wHashIdent, b32BitIdent);
302 return m_pLeftTree->CreatePartRecoveryData(nStartPos, nSize, fileDataOut, wHashIdent, b32BitIdent);
309 m_pLeftTree->WriteHash(fileDataOut, wHashIdent, b32BitIdent);
310 return m_pRightTree->CreatePartRecoveryData(nStartPos, nSize, fileDataOut, wHashIdent, b32BitIdent);
317 void CAICHHashTree::WriteHash(CFileDataIO* fileDataOut, uint32 wHashIdent, bool b32BitIdent) const
320 wHashIdent <<= 1;
321 wHashIdent |= (m_bIsLeftBranch) ? 1: 0;
324 wxASSERT( wHashIdent <= 0xFFFF );
325 fileDataOut->WriteUInt16((uint16)wHashIdent);
327 fileDataOut->WriteUInt32(wHashIdent);
335 bool CAICHHashTree::WriteLowestLevelHashs(CFileDataIO* fileDataOut, uint32 wHashIdent, bool bNoIdent, bool b32BitIdent) const
337 wHashIdent <<= 1;
338 wHashIdent |= (m_bIsLeftBranch) ? 1: 0;
342 wxASSERT( wHashIdent <= 0xFFFF );
343 fileDataOut->WriteUInt16((uint16)wHashIdent);
345 fileDataOut->WriteUInt32(wHashIdent);
358 return m_pLeftTree->WriteLowestLevelHashs(fileDataOut, wHashIdent, bNoIdent, b32BitIdent)
359 && m_pRightTree->WriteLowestLevelHashs(fileDataOut, wHashIdent, bNoIdent, b32BitIdent);
391 // write the hash, specified by wHashIdent, with Data from fileInput.
392 bool CAICHHashTree::SetHash(CFileDataIO* fileInput, uint32 wHashIdent, sint8 nLevel, bool bAllowOverwrite)
397 for (; i != 32 && (wHashIdent & 0x80000000) == 0; ++i) {
398 wHashIdent <<= 1;
423 wHashIdent <<= 1;
428 if ((wHashIdent & 0x80000000) > 0) {
434 return m_pLeftTree->SetHash(fileInput, wHashIdent, nLevel);
441 return m_pRightTree->SetHash(fileInput, wHashIdent, nLevel);
561 uint16 wHashIdent = fileDataIn->ReadUInt16();
562 if (wHashIdent == 1 /*never allow masterhash to be overwritten*/
563 || !m_pHashTree.SetHash(fileDataIn, wHashIdent,(-1), false))
585 uint32 wHashIdent = fileDataIn->ReadUInt32();
586 if (wHashIdent == 1 /*never allow masterhash to be overwritten*/
587 || wHashIdent > 0x400000
588 || !m_pHashTree.SetHash(fileDataIn, wHashIdent,(-1), false))