Some updates to payload_aes_busy structure, call AES_HW_CRYPTO_CMD with correct arg data types

This commit is contained in:
2020-01-07 11:13:46 -05:00
parent d8f5e48598
commit 5e1ae86293
3 changed files with 34 additions and 2 deletions

View File

@@ -0,0 +1,22 @@
#include "util.h"
#include "brfunc_aes.h"
TEXT_SECTION
int _start(void *src, void *dst, void *key, int rep)
{
int i, j;
unsigned char src_data[16];
for(j = 0; j < 16; j++)
{
src_data[j] = ((unsigned char *) src)[j];
}
for(i = 0; i < rep; i++)
{
if(i % 2 == 0) aes_hw_crypto_cmd(16, src_data, dst, 16, 0, key, 0);
else aes_hw_crypto_cmd(16, dst, src_data, 16, 0, key, 0);
}
return 0;
}