esp_secure_boot_generate_digest() function
Generate secure digest from bootloader image @important This function is intended to be called from bootloader code only. This function is only used in the context of the Secure Boot V1 scheme. If secure boot is not yet enabled for bootloader, this will: 1) generate the secure boot key and burn it on EFUSE (without enabling R/W protection) 2) generate the digest from bootloader and save it to flash address 0x0 If first boot gets interrupted after calling this function but before esp_secure_boot_permanently_enable() is called, then the key burned on EFUSE will not be regenerated, unless manually done using espefuse.py tool
Syntax
esp_err_t esp_secure_boot_generate_digest(void); Return value
ESP_OK if secure boot digest is generated successfully or found to be already present
![]()
esp_err_t esp_secure_boot_generate_digest(void);