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

Function shortcutIdentityHash

app/src/Platform/AppPlatform.cpp:395–403  ·  view source on GitHub ↗

* @brief Computes a stable 16-char SHA-1 prefix identifying a shortcut path. */

Source from the content-addressed store, hash-verified

393 * @brief Computes a stable 16-char SHA-1 prefix identifying a shortcut path.
394 */
395QString shortcutIdentityHash(const QString& shortcutPath)
396{
397 if (shortcutPath.isEmpty())
398 return QString();
399
400 const QByteArray digest =
401 QCryptographicHash::hash(shortcutPath.toUtf8(), QCryptographicHash::Sha1);
402 return QString::fromLatin1(digest.toHex().left(16));
403}
404
405// code-verify off (cold argv setup before QApplication exists; C malloc is intentional)
406/**

Callers 2

bootstrapModuleManagerFunction · 0.85
setWindowsAppUserModelIdFunction · 0.85

Calls 2

isEmptyMethod · 0.80
toHexMethod · 0.80

Tested by

no test coverage detected