1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avutil/tests/aes_ctr: reindent after the previous commit

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2025-04-03 17:48:30 -03:00
parent 19085287b4
commit 462d35dc72

View File

@ -45,36 +45,36 @@ int main (void)
const uint8_t *iv; const uint8_t *iv;
for (int i = 0; i < 2; i++) { for (int i = 0; i < 2; i++) {
ae = av_aes_ctr_alloc(); ae = av_aes_ctr_alloc();
ad = av_aes_ctr_alloc(); ad = av_aes_ctr_alloc();
if (!ae || !ad) if (!ae || !ad)
goto ERROR; goto ERROR;
if (av_aes_ctr_init(ae, (const uint8_t*)"0123456789abcdef") < 0) if (av_aes_ctr_init(ae, (const uint8_t*)"0123456789abcdef") < 0)
goto ERROR; goto ERROR;
if (av_aes_ctr_init(ad, (const uint8_t*)"0123456789abcdef") < 0) if (av_aes_ctr_init(ad, (const uint8_t*)"0123456789abcdef") < 0)
goto ERROR; goto ERROR;
if (i) if (i)
av_aes_ctr_set_iv(ae, fixed_iv); av_aes_ctr_set_iv(ae, fixed_iv);
else else
av_aes_ctr_set_random_iv(ae); av_aes_ctr_set_random_iv(ae);
iv = av_aes_ctr_get_iv(ae); iv = av_aes_ctr_get_iv(ae);
av_aes_ctr_set_full_iv(ad, iv); av_aes_ctr_set_full_iv(ad, iv);
av_aes_ctr_crypt(ae, tmp, plain, sizeof(tmp)); av_aes_ctr_crypt(ae, tmp, plain, sizeof(tmp));
if (i && memcmp(tmp, encrypted, sizeof(tmp)) != 0) { if (i && memcmp(tmp, encrypted, sizeof(tmp)) != 0) {
av_log(NULL, AV_LOG_ERROR, "test failed\n"); av_log(NULL, AV_LOG_ERROR, "test failed\n");
goto ERROR; goto ERROR;
} }
av_aes_ctr_crypt(ad, tmp, tmp, sizeof(tmp));
if (memcmp(tmp, plain, sizeof(tmp)) != 0){ av_aes_ctr_crypt(ad, tmp, tmp, sizeof(tmp));
av_log(NULL, AV_LOG_ERROR, "test failed\n"); if (memcmp(tmp, plain, sizeof(tmp)) != 0){
goto ERROR; av_log(NULL, AV_LOG_ERROR, "test failed\n");
} goto ERROR;
}
av_aes_ctr_free(ae); av_aes_ctr_free(ae);
av_aes_ctr_free(ad); av_aes_ctr_free(ad);