Page 1 of 1

Common SHA256 Checksum for Files?

Posted: Tue Jul 23, 2024 1:29 am
by gamename
Hi,

I'm having problems with OTA firmware verification prior to reboot.

Here's the process I'm following:
1. GitHub builds the firmware image and calculates a SHA-256 checksum.
2. The file is then saved to an AWS S3 bucket.
3. During OTA, the firmware is copied from S3 to the ESP32.
4. On the ESP32, I recalculate the checksum locally and compare it to the GitHub checksum.

However, the two values never match. Recalculating the checksum on S3 matches the GitHub value, so it's clear that my ESP32 calculations are incorrect.

Rather than reinventing the wheel, is there a standard utility for SHA-256 file checksum calculation on the ESP32?

Thanks!