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

Method CreateHashFromFile

src/KnownFile.cpp:876–885  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

874
875
876void CKnownFile::CreateHashFromFile(CFileAutoClose& file, uint64 offset, uint32 Length, CMD4Hash* Output, CAICHHashTree* pShaHashOut)
877{
878 wxCHECK_RET(Length, "No input to hash from in CreateHashFromFile");
879
880 CFileArea area;
881 area.ReadAt(file, offset, Length);
882
883 CreateHashFromInput(area.GetBuffer(), Length, Output, pShaHashOut);
884 area.CheckError();
885}
886
887
888void CKnownFile::CreateHashFromInput(const uint8_t* input, uint32 Length, CMD4Hash* Output, CAICHHashTree* pShaHashOut )

Callers 1

CreateNextPartHashMethod · 0.80

Calls 3

CheckErrorMethod · 0.80
ReadAtMethod · 0.45
GetBufferMethod · 0.45

Tested by

no test coverage detected