]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/aes.c
Update aes.c (#336)
[proxmark3-svn] / armsrc / aes.c
index 3df006bb355f2b0f7db494b36f98c8fd53355868..0a3f893d636b07ead4d35b55843aed2613a1fbe9 100644 (file)
@@ -1,4 +1,3 @@
-#include "stdio.h"
 #include "aes.h"
 
 static const unsigned int Te0[256] = {
@@ -1138,6 +1137,9 @@ int AesDecrypt(AesCtx *pCtx, unsigned char *pCipher, unsigned char *pData, unsig
 //////////////////////////////////////////////////////////////////////////////
 
 #ifndef EMBEDDED
+
+#include <stdio.h>
+
 int main()
 {
     AesCtx ctx;
@@ -1150,7 +1152,7 @@ int main()
     if( AesCtxIni(&ctx, iv, key, KEY128, CBC) < 0)
         printf("init error\n");
 
-    if (AesEncrypt(&ctx, databuf, databuf, sizeof databuf) < 0)
+    if (AesEncrypt(&ctx, databuf, databuf, sizeof(databuf) ) < 0)
         printf("error in encryption\n");
 
     // initialize context and decrypt cipher at other end
@@ -1158,11 +1160,11 @@ int main()
     if( AesCtxIni(&ctx, iv, key, KEY128, CBC) < 0)
         printf("init error\n");
 
-    if (AesDecrypt(&ctx, databuf, databuf, sizeof databuf) < 0)
+    if (AesDecrypt(&ctx, databuf, databuf, sizeof(databuf) ) < 0)
         printf("error in decryption\n");
 
     printf("%s\n", databuf);
 
     return 0;
 }
-#endif
\ No newline at end of file
+#endif
Impressum, Datenschutz