X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/blobdiff_plain/8772e41521e503cf036450c57d4a3965835a89d3..f9c7d95fc6c7299a40d4c917dc9972bf340eabd4:/SboxAES/IOT/main.c?ds=sidebyside diff --git a/SboxAES/IOT/main.c b/SboxAES/IOT/main.c index 34d24c2..90f4369 100644 --- a/SboxAES/IOT/main.c +++ b/SboxAES/IOT/main.c @@ -4,13 +4,14 @@ #include #include #include +#include #include"aes.h" #define CTR 1 -const int size_mesg=64; +const int size_mesg=1024; typedef unsigned char byte; @@ -19,6 +20,22 @@ typedef unsigned char byte; +double TimeStart() +{ + struct timeval tstart; + gettimeofday(&tstart,0); + return( (double) (tstart.tv_sec + tstart.tv_usec*1e-6) ); +} + +double TimeStop(double t) +{ + struct timeval tend; + + gettimeofday(&tend,0); + t = (double) (tend.tv_sec + tend.tv_usec*1e-6) - t; + return (t); +} + @@ -63,26 +80,46 @@ int main(int argc, char** argv) { for(int i=0;i