]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Stop using "u32" and "u8" in aes.c
authorNick Mathewson <nickm@torproject.org>
Wed, 9 Nov 2011 03:54:52 +0000 (22:54 -0500)
committerNick Mathewson <nickm@torproject.org>
Fri, 11 Nov 2011 16:47:24 +0000 (11:47 -0500)
src/common/aes.c

index ab8f7f6b29498a7ce068a7d692ab1e2430a301c9..c7e0aff362a0f29e34ebe7a353ff86ec262ed3e6 100644 (file)
 # include <openssl/evp.h>
 #endif
 
-/*======================================================================*/
-/* From rijndael-alg-fst.h */
-
-typedef uint32_t u32;
-typedef uint8_t u8;
-
 /*======================================================================*/
 /* Interface to AES code, and counter implementation */
 
@@ -65,27 +59,27 @@ struct aes_cnt_cipher {
 #define USING_COUNTER_VARS
   /** These four values, together, implement a 128-bit counter, with
    * counter0 as the low-order word and counter3 as the high-order word. */
-  u32 counter3;
-  u32 counter2;
-  u32 counter1;
-  u32 counter0;
+  uint32_t counter3;
+  uint32_t counter2;
+  uint32_t counter1;
+  uint32_t counter0;
 #endif
 
 #ifndef USE_RIJNDAEL_COUNTER_OPTIMIZATION
 #define USING_COUNTER_BUFS
   union {
     /** The counter, in big-endian order, as bytes. */
-    u8 buf[16];
+    uint8_t buf[16];
     /** The counter, in big-endian order, as big-endian words.  Note that
      * on big-endian platforms, this is redundant with counter3...0,
      * so we just use these values instead. */
-    u32 buf32[4];
+    uint32_t buf32[4];
   } ctr_buf;
 #endif
   /** The encrypted value of ctr_buf. */
-  u8 buf[16];
+  uint8_t buf[16];
   /** Our current stream position within buf. */
-  u8 pos;
+  uint8_t pos;
 };
 
 #if !defined(USING_COUNTER_VARS)