summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkokke <spam@rowdy.dk>2015-05-25 23:40:42 +0200
committerkokke <spam@rowdy.dk>2015-05-25 23:40:42 +0200
commit7c959460a188611c26aa45c54c6e8b96b7ac163a (patch)
treec9cb092f8f809565b93ffe2752105438d56d8f32
parentUpdate test.c (diff)
parentUpdate aes.c (diff)
downloadtiny-AES-c-7c959460a188611c26aa45c54c6e8b96b7ac163a.tar
tiny-AES-c-7c959460a188611c26aa45c54c6e8b96b7ac163a.tar.gz
tiny-AES-c-7c959460a188611c26aa45c54c6e8b96b7ac163a.tar.bz2
tiny-AES-c-7c959460a188611c26aa45c54c6e8b96b7ac163a.tar.lz
tiny-AES-c-7c959460a188611c26aa45c54c6e8b96b7ac163a.tar.xz
tiny-AES-c-7c959460a188611c26aa45c54c6e8b96b7ac163a.tar.zst
tiny-AES-c-7c959460a188611c26aa45c54c6e8b96b7ac163a.zip
-rw-r--r--aes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/aes.c b/aes.c
index 4c7645f..38ec132 100644
--- a/aes.c
+++ b/aes.c
@@ -498,7 +498,7 @@ static void XorWithIv(uint8_t* buf)
void AES128_CBC_encrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, const uint8_t* key, const uint8_t* iv)
{
- intptr_t i;
+ uintptr_t i;
uint8_t remainders = length % KEYLEN; /* Remaining bytes in the last non-full block */
BlockCopy(output, input);
@@ -538,7 +538,7 @@ void AES128_CBC_encrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length,
void AES128_CBC_decrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, const uint8_t* key, const uint8_t* iv)
{
- intptr_t i;
+ uintptr_t i;
uint8_t remainders = length % KEYLEN; /* Remaining bytes in the last non-full block */
BlockCopy(output, input);