aboutsummaryrefslogtreecommitdiff
path: root/src/common/aes.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-11-08 22:54:52 -0500
committerNick Mathewson <nickm@torproject.org>2011-11-11 11:47:24 -0500
commit7d8edfcceb05c6a85ed34090c87615624cdfb3af (patch)
treec183d7a23be6fc0992b2078a1c1d5d9a180b16d3 /src/common/aes.c
parent21cf7079fe2b3f0e5947f89f713c6a6fba37dc48 (diff)
downloadtor-7d8edfcceb05c6a85ed34090c87615624cdfb3af.tar
tor-7d8edfcceb05c6a85ed34090c87615624cdfb3af.tar.gz
Stop using "u32" and "u8" in aes.c
Diffstat (limited to 'src/common/aes.c')
-rw-r--r--src/common/aes.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/common/aes.c b/src/common/aes.c
index ab8f7f6b2..c7e0aff36 100644
--- a/src/common/aes.c
+++ b/src/common/aes.c
@@ -44,12 +44,6 @@
#endif
/*======================================================================*/
-/* From rijndael-alg-fst.h */
-
-typedef uint32_t u32;
-typedef uint8_t u8;
-
-/*======================================================================*/
/* Interface to AES code, and counter implementation */
/** Implements an AES counter-mode cipher. */
@@ -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)