MCPcopy Create free account
hub / github.com/Duet3D/RepRapFirmware / StartHash

Method StartHash

src/GCodes/GCodes3.cpp:1372–1384  ·  view source on GitHub ↗

M38 (SHA1 hash of a file) implementation:

Source from the content-addressed store, hash-verified

1370
1371// M38 (SHA1 hash of a file) implementation:
1372bool GCodes::StartHash(const char* filename) noexcept
1373{
1374 // Get a FileStore object
1375 fileBeingHashed = platform.OpenFile(FS_PREFIX, filename, OpenMode::read);
1376 if (fileBeingHashed == nullptr)
1377 {
1378 return false;
1379 }
1380
1381 // Start hashing
1382 hash.Reset();
1383 return true;
1384}
1385
1386GCodeResult GCodes::AdvanceHash(const StringRef &reply) noexcept
1387{

Callers

nothing calls this directly

Calls 2

OpenFileMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected