Remove yet another redundant memcpy. Not at least performance critical,
authorAndy Polyakov <appro@openssl.org>
Sun, 26 Dec 2004 13:05:40 +0000 (13:05 +0000)
committerAndy Polyakov <appro@openssl.org>
Sun, 26 Dec 2004 13:05:40 +0000 (13:05 +0000)
essentially cosmetic modification...

crypto/aes/aes_cbc.c

index e43135e..41d538f 100644 (file)
@@ -82,11 +82,10 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
                }
                if (len) {
                        for(n=0; n < len; ++n)
-                               tmp[n] = in[n] ^ iv[n];
+                               out[n] = in[n] ^ iv[n];
                        for(n=len; n < AES_BLOCK_SIZE; ++n)
-                               tmp[n] = iv[n];
-                       AES_encrypt(tmp, tmp, key);
-                       memcpy(out, tmp, AES_BLOCK_SIZE);
+                               out[n] = iv[n];
+                       AES_encrypt(out, out, key);
                        iv = out;
                }                       
                memcpy(ivec,iv,AES_BLOCK_SIZE);