MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / checksum

Method checksum

app/src/IO/Checksum.cpp:326–334  ·  view source on GitHub ↗

* @brief Computes a checksum or CRC value for the given data using the specified algorithm. */

Source from the content-addressed store, hash-verified

324 * @brief Computes a checksum or CRC value for the given data using the specified algorithm.
325 */
326QByteArray IO::checksum(const QString& name, const QByteArray& data)
327{
328 const auto& map = checksumFunctionMap();
329 const auto it = map.find(name);
330 if (it != map.end())
331 return it.value()(data.constData(), data.size());
332
333 return {};
334}

Callers

nothing calls this directly

Calls 3

findMethod · 0.80
valueMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected