ESP32-C3 FLASH encryption using ESP-IDF framework

I am trying to implement Flash encryption in my project. I am using Platformio IDE with espressif32 framework. I accessed menuconfig and changed settings to enable Develop Flash encryption mode. Next step would be random key generation, but platformio cli doesn’t recognise this command generate_flash_encryption_key my_flash_encryption_key.bin. Maybe someone can give me step by step guide, how to accomplish this ?