7 void prekey (int bits, int blocks);
9 byte key[] = "01234567899876543210012345678998";
11 byte plain[] = "TESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTEST";
13 //real iv = iv x2 ex: 01234567 = 0123456701234567
14 unsigned long long int my_iv = 01234567;
16 int main(int argc, char** argv)
18 printf("\n===testng mode\n") ;
20 for (int i=0;i<1;i++){
25 void prekey (int bits)
28 byte plain_p[sizeof(plain) + (N_BLOCK - (sizeof(plain) % 16)) - 1];
29 byte cipher[sizeof(plain_p)];
30 aes.do_aes_encrypt(plain,sizeof(plain),cipher,key,bits);
32 aes.do_aes_decrypt(cipher,aes.get_size(),plain_p,key,bits,iv);
33 //normally u have sizeof(cipher) but if its in the same sketch you cannot determin it dynamically
35 printf("\n\nPLAIN :");
36 aes.printArray(plain);
38 aes.printArray(cipher);
40 aes.printArray(plain_p);
41 printf("\n============================================================\n");