6 byte *key = (unsigned char*)"0123456789010123";
8 byte plain[] = "Add NodeAdd NodeAdd NodeAdd NodeAdd Node";
10 //real iv = iv x2 ex: 01234567 = 0123456701234567
11 unsigned long long int my_iv = 36753562;
15 Serial.begin (57600) ;
18 printf("\n===testng mode\n") ;
30 void prekey (int bits)
37 unsigned long ms = micros ();
40 aes.do_aes_encrypt(plain,41,cipher,key,bits,iv);
41 Serial.print("Encryption took: ");
42 Serial.println(micros() - ms);
46 aes.do_aes_decrypt(cipher,48,check,key,bits,iv);
47 Serial.print("Decryption took: ");
48 Serial.println(micros() - ms);
49 printf("\n\nPLAIN :");
50 aes.printArray(plain,(bool)true);
52 aes.printArray(cipher,(bool)false);
54 aes.printArray(check,(bool)true);
56 aes.printArray(iv,16);
57 printf("\n============================================================\n");