From a81a6663edc8e880bf7ae3239fabc1bd19aeb20a Mon Sep 17 00:00:00 2001 From: JP Aumasson Date: Sun, 9 Nov 2014 13:57:48 +0100 Subject: consistent types --- main.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index e5d0c49..c9165c9 100644 --- a/main.c +++ b/main.c @@ -16,10 +16,6 @@ #include #include -typedef uint64_t u64; -typedef uint32_t u32; -typedef uint8_t u8; - #define MAXLEN 64 #define KEYLEN 16 #ifndef DOUBLE @@ -29,8 +25,7 @@ typedef uint8_t u8; #endif -extern int siphash( unsigned char *out, const unsigned char *in, - unsigned long long inlen, const unsigned char *k ); +extern int siphash( uint8_t *out, const uint8_t *in, uint64_t inlen, const uint8_t *k ); /* SipHash-2-4 output with @@ -43,7 +38,7 @@ extern int siphash( unsigned char *out, const unsigned char *in, ... in = 00 01 02 ... 3e (63 bytes) */ -const u8 vectors[MAXLEN][HASHLEN] = +const uint8_t vectors[MAXLEN][HASHLEN] = { #ifndef DOUBLE { 0x31, 0x0e, 0x0e, 0xdd, 0x47, 0xdb, 0x6f, 0x72, }, @@ -181,7 +176,7 @@ const u8 vectors[MAXLEN][HASHLEN] = int test_vectors() { - u8 in[MAXLEN], out[HASHLEN], k[KEYLEN]; + uint8_t in[MAXLEN], out[HASHLEN], k[KEYLEN]; int i; int fails = 0; -- cgit v1.2.3