提交 9850f7f6 编写于 作者: A Andy Polyakov

Remove yet another redundant memcpy. Not at least performance critical,

essentially cosmetic modification...
上级 131e064e
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册