MCPcopy Create free account
hub / github.com/amule-project/amule / WriteHash

Method WriteHash

src/SHAHashSet.cpp:322–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320
321
322void CAICHHashTree::WriteHash(CFileDataIO* fileDataOut, uint32 wHashIdent, bool b32BitIdent) const
323{
324 wxASSERT( m_bHashValid );
325 wHashIdent <<= 1;
326 wHashIdent |= (m_bIsLeftBranch) ? 1: 0;
327
328 if (!b32BitIdent) {
329 wxASSERT( wHashIdent <= 0xFFFF );
330 fileDataOut->WriteUInt16((uint16)wHashIdent);
331 } else {
332 fileDataOut->WriteUInt32(wHashIdent);
333 }
334
335 m_Hash.Write(fileDataOut);
336}
337
338
339// write lowest level hashs into file, ordered from left to right optional without identifier

Callers 1

Calls 3

WriteUInt16Method · 0.80
WriteUInt32Method · 0.80
WriteMethod · 0.45

Tested by

no test coverage detected