FastLED 3.10.8
Loading...
Searching...
No Matches

◆ bootGuardHashWords()

FL_ALWAYS_INLINE fl::u32 fl::bootGuardHashWords ( const volatile fl::u32 * words,
fl::u32 count,
fl::u32 stride = 1 )

FNV-1a over every stride-th of count 32-bit words; platforms hash their firmware image with it to get the record key.

Definition at line 80 of file boot_guard_record.h.

81 {
82 fl::u32 h = 0x811C9DC5u;
83 for (fl::u32 i = 0; i < count; i += stride) {
84 h = (h ^ words[i]) * 0x01000193u;
85 }
86 return h;
87}

References FL_ALWAYS_INLINE.