mirror of https://git.ffmpeg.org/ffmpeg.git
Merge commit 'a86ef80494d759807a5ef8dd12838f0690092e37'
* commit 'a86ef80494d759807a5ef8dd12838f0690092e37': blowfish-test: Return different values for different errors Merged-by: Clément Bœsch <clement@stupeflix.com>
This commit is contained in:
commit
1ca383c8d4
|
@ -174,13 +174,13 @@ int main(void)
|
||||||
av_blowfish_crypt_ecb(&ctx, &tmptext_l[i], &tmptext_r[i], 0);
|
av_blowfish_crypt_ecb(&ctx, &tmptext_l[i], &tmptext_r[i], 0);
|
||||||
if (tmptext_l[i] != ciphertext_l[i] || tmptext_r[i] != ciphertext_r[i]) {
|
if (tmptext_l[i] != ciphertext_l[i] || tmptext_r[i] != ciphertext_r[i]) {
|
||||||
printf("Test encryption failed.\n");
|
printf("Test encryption failed.\n");
|
||||||
return 1;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
av_blowfish_crypt_ecb(&ctx, &tmptext_l[i], &tmptext_r[i], 1);
|
av_blowfish_crypt_ecb(&ctx, &tmptext_l[i], &tmptext_r[i], 1);
|
||||||
if (tmptext_l[i] != plaintext_l[i] || tmptext_r[i] != plaintext_r[i]) {
|
if (tmptext_l[i] != plaintext_l[i] || tmptext_r[i] != plaintext_r[i]) {
|
||||||
printf("Test decryption failed.\n");
|
printf("Test decryption failed.\n");
|
||||||
return 1;
|
return 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("Test encryption/decryption success.\n");
|
printf("Test encryption/decryption success.\n");
|
||||||
|
|
Loading…
Reference in New Issue