I think the two API blufi_aes_encrypt & blufi_aes_decrypt are to be used to encrypt and decrypt. I tried to make a test code.
first I initalized
Code: Select all
void app_main()
{
char *input="hello";
char *out;
if( security_init() == ESP_FAIL )
{
ESP_LOGI(TAG,"Security init failed.\n");
}
ESP_LOGI(TAG,"Security done.\n");
aes_encrypt(10, input,5); <---- but this keeps crashing I don't understand its input.
ESP_LOGI(TAG,"Encrypted : %s \n",input);
}
I am also thinking where the encryption key set?
I want simple way to encrypt and decrypt data. so please any example would be helpful.