Write only till the embedded file size in the NVS partition. Earlier
the length was kept as the whole partition size and it could result
in accessing embedded rodata beyond the MMU mapped range.
- This change will introduce a breaking change for SoCs with the HMAC
peripheral. Turning on flash encryption will no longer enable NVS
encryption automatically.
Closes https://github.com/espressif/esp-idf/issues/12549