From: Andy Polyakov Date: Mon, 23 Aug 2004 22:19:51 +0000 (+0000) Subject: Make aes_ctr.c 64-bit savvy. X-Git-Tag: BEN_FIPS_TEST_6~14^2~96 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=14fa6ad9f9c92ef9e28311b4df5a02fdb0d1ec27 Make aes_ctr.c 64-bit savvy. --- diff --git a/crypto/aes/aes_ctr.c b/crypto/aes/aes_ctr.c index 2487d83fb1..f36982be1e 100644 --- a/crypto/aes/aes_ctr.c +++ b/crypto/aes/aes_ctr.c @@ -68,7 +68,7 @@ static void AES_ctr128_inc(unsigned char *counter) { /* Grab bottom dword of counter and increment */ c = GETU32(counter + 12); - c++; + c++; c &= 0xFFFFFFFF; PUTU32(counter + 12, c); /* if no overflow, we're done */ @@ -77,7 +77,7 @@ static void AES_ctr128_inc(unsigned char *counter) { /* Grab 1st dword of counter and increment */ c = GETU32(counter + 8); - c++; + c++; c &= 0xFFFFFFFF; PUTU32(counter + 8, c); /* if no overflow, we're done */ @@ -86,7 +86,7 @@ static void AES_ctr128_inc(unsigned char *counter) { /* Grab 2nd dword of counter and increment */ c = GETU32(counter + 4); - c++; + c++; c &= 0xFFFFFFFF; PUTU32(counter + 4, c); /* if no overflow, we're done */ @@ -95,7 +95,7 @@ static void AES_ctr128_inc(unsigned char *counter) { /* Grab top dword of counter and increment */ c = GETU32(counter + 0); - c++; + c++; c &= 0xFFFFFFFF; PUTU32(counter + 0, c); }