From ce6577ee3596990c6c461ed5021a1c8a7213ab82 Mon Sep 17 00:00:00 2001 From: Damian Schneider Date: Thu, 27 Nov 2025 11:49:33 +0100 Subject: [PATCH] add caching back --- wled00/util.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/wled00/util.cpp b/wled00/util.cpp index e4aaad74..d135cc4f 100644 --- a/wled00/util.cpp +++ b/wled00/util.cpp @@ -1207,6 +1207,7 @@ String generateDeviceFingerprint() { // Returns: original SHA1 + last 2 chars of double-hashed SHA1 (42 chars total) String getDeviceId() { static String cachedDeviceId = ""; + if (cachedDeviceId.length() > 0) return cachedDeviceId; // The device string is deterministic as it needs to be consistent for the same device, even after a full flash erase // MAC is salted with other consistent device info to avoid rainbow table attacks. // If the MAC address is known by malicious actors, they could precompute SHA1 hashes to impersonate devices,