summaryrefslogtreecommitdiff
path: root/libavutil/tests
diff options
context:
space:
mode:
authorClément Bœsch <cboesch@gopro.com>2017-09-07 15:56:56 +0200
committerClément Bœsch <u@pkh.me>2017-09-08 18:51:05 +0200
commitdc27df47ff99fb29ed36711a62efb78ee28dba97 (patch)
treea22cbb5f94d55140d46c43c74e1289fd84da85c6 /libavutil/tests
parent9c0d823a7c2c29560f298a007289b9a63d0e3b87 (diff)
lavu/tests/des: rename crypt to crypt_ref
This will prevent a symbol clash with crypt(3) after unistd.h is included.
Diffstat (limited to 'libavutil/tests')
-rw-r--r--libavutil/tests/des.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavutil/tests/des.c b/libavutil/tests/des.c
index 309be29473..eac33d47d4 100644
--- a/libavutil/tests/des.c
+++ b/libavutil/tests/des.c
@@ -34,7 +34,7 @@ static uint64_t rand64(void)
static const uint8_t test_key[] = { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 };
static const DECLARE_ALIGNED(8, uint8_t, plain)[] = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 };
-static const DECLARE_ALIGNED(8, uint8_t, crypt)[] = { 0x4a, 0xb6, 0x5b, 0x3d, 0x4b, 0x06, 0x15, 0x18 };
+static const DECLARE_ALIGNED(8, uint8_t, crypt_ref)[] = { 0x4a, 0xb6, 0x5b, 0x3d, 0x4b, 0x06, 0x15, 0x18 };
static DECLARE_ALIGNED(8, uint8_t, tmp)[8];
static DECLARE_ALIGNED(8, uint8_t, large_buffer)[10002][8];
static const uint8_t cbc_key[] = {
@@ -82,13 +82,13 @@ int main(void)
key[0].word = AV_RB64(test_key);
data.word = AV_RB64(plain);
gen_roundkeys(roundkeys, key[0].word);
- if (des_encdec(data.word, roundkeys, 0) != AV_RB64(crypt)) {
+ if (des_encdec(data.word, roundkeys, 0) != AV_RB64(crypt_ref)) {
printf("Test 1 failed\n");
return 1;
}
av_des_init(&d, test_key, 64, 0);
av_des_crypt(&d, tmp, plain, 1, NULL, 0);
- if (memcmp(tmp, crypt, sizeof(crypt))) {
+ if (memcmp(tmp, crypt_ref, sizeof(crypt_ref))) {
printf("Public API decryption failed\n");
return 1;
}