mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
The output from AES_cbc_encrypt() should be exact multiple blocks when encrypting
This commit is contained in:
parent
40e5b9abeb
commit
55b12f8641
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user