NVS encryption in Platformio

Hi community… I was looking at this post…

I would like to bother you asking if i can if it is possible to
use the 2 flavours at encryption at the same time …

NVS supports two flavours of encryption:

runtime-encryption whereby the application itself generates the key and encrypts/decrypts data on the fly, and
build-time encryption whereby the nvs volume is pre-encrypted and flashed to the device

I need to store the certificates and keys as you explained but i also need to encrypt the wifi data (ssid and password) coming runtime.

another question related to this …
runtime-encryption whereby the application itself generates the key and encrypts/decrypts data on the fly, and

How can i do it… it is enough create the partition.csv ? and then enable the encryption inside menuconfig?

Once it is done … how can i store the data with nvs runtime encryption?

For the moment I am using the preferences lib in the arduino envioment…

Thanks a lot for your help in advance