mirror of https://github.com/kokke/tiny-AES-c
Update aes.c
This commit is contained in:
parent
1cd676c262
commit
84468b291b
2
aes.c
2
aes.c
|
@ -550,6 +550,8 @@ void AES_CBC_encrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, co
|
||||||
if (extra)
|
if (extra)
|
||||||
{
|
{
|
||||||
memcpy(output, input, extra);
|
memcpy(output, input, extra);
|
||||||
|
memset((output + extra), 0, (BLOCKLEN - extra));
|
||||||
|
XorWithIv(output);
|
||||||
state = (state_t*)output;
|
state = (state_t*)output;
|
||||||
Cipher();
|
Cipher();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue