The output from AES_cbc_encrypt() should be exact multiple blocks when encrypting

This commit is contained in:
Richard Levitte 2003-06-10 04:11:42 +00:00
parent 40e5b9abeb
commit 55b12f8641

View File

@ -86,7 +86,7 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
for(n=len; n < AES_BLOCK_SIZE; ++n)
tmp[n] = ivec[n];
AES_encrypt(tmp, tmp, key);
memcpy(out, tmp, len);
memcpy(out, tmp, AES_BLOCK_SIZE);
memcpy(ivec, tmp, AES_BLOCK_SIZE);
}
} else {