diff options
author | Anton Kling <anton@kling.gg> | 2023-11-10 15:47:08 +0100 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2023-11-10 15:47:08 +0100 |
commit | 9a1f977e39d8e9fcb6a9cb2a612f4743e802221d (patch) | |
tree | 1fc53f6e80eb40d24274f2f8967d584b88c6d664 /kernel/crypto | |
parent | 0cb4afef6da5488a128e5aaece435e9aa5f5797e (diff) |
Kernel Style: Change uint*_t -> u*
Diffstat (limited to 'kernel/crypto')
-rw-r--r-- | kernel/crypto/ChaCha20/chacha20.c | 4 | ||||
-rw-r--r-- | kernel/crypto/ChaCha20/chacha20.h | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/kernel/crypto/ChaCha20/chacha20.c b/kernel/crypto/ChaCha20/chacha20.c index 5bf7aa2..0f74844 100644 --- a/kernel/crypto/ChaCha20/chacha20.c +++ b/kernel/crypto/ChaCha20/chacha20.c @@ -6,10 +6,10 @@ a += b, d ^= a, d = ROTL(d, 8), c += d, b ^= c, b = ROTL(b, 7)) #define ROUNDS 20 -void chacha_block(uint32_t out[16], uint32_t const in[16]) +void chacha_block(u32 out[16], u32 const in[16]) { int i; - uint32_t x[16]; + u32 x[16]; for (i = 0; i < 16; ++i) x[i] = in[i]; diff --git a/kernel/crypto/ChaCha20/chacha20.h b/kernel/crypto/ChaCha20/chacha20.h index 17532f3..3278783 100644 --- a/kernel/crypto/ChaCha20/chacha20.h +++ b/kernel/crypto/ChaCha20/chacha20.h @@ -1,15 +1,15 @@ #ifndef CHACHA20_H #define CHACHA20_H -#include <stdint.h> +#include <typedefs.h> #define KEY 4 -#define KEY_SIZE 8*sizeof(uint32_t) +#define KEY_SIZE 8*sizeof(u32) #define COUNT 12 -#define COUNT_SIZE sizeof(uint32_t) +#define COUNT_SIZE sizeof(u32) #define COUNT_MAX (0x100000000-1) // 2^32 - 1 #define NONCE 13 -#define NONCE_SIZE 2*sizeof(uint32_t) -#define BLOCK_SIZE 16*sizeof(uint32_t) +#define NONCE_SIZE 2*sizeof(u32) +#define BLOCK_SIZE 16*sizeof(u32) -void chacha_block(uint32_t out[16], uint32_t const in[16]); +void chacha_block(u32 out[16], u32 const in[16]); #endif |