mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
Remove yet another redundant memcpy. Not at least performance critical,
essentially cosmetic modification...
This commit is contained in:
parent
131e064e4a
commit
9850f7f6b2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user