Remove yet another redundant memcpy. Not at least performance critical,
essentially cosmetic modification...
This commit is contained in:
parent
131e064e4a
commit
9850f7f6b2
1 changed files with 3 additions and 4 deletions
|
@ -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 a new issue