画是什么结构| 海参什么人不适合吃| 平均血小板体积偏高是什么意思| 喝什么养胃| 中介什么意思| 喝茶叶有什么好处| 刺瘊子是什么原因造成的| 什么树没有叶| 蔬菜沙拉一般用什么蔬菜| 什么酒不能喝打一生肖| 经常拉肚子挂什么科| 76年属什么的生肖| 脖子为什么有颈纹| 游戏黑洞是什么意思| 丝苗米是什么米| 奶油小生什么意思| 眼角发痒用什么眼药水| 什么不得| 肾火旺有什么症状| 呼吸困难气短是什么原因| 上皮内瘤变是什么意思| 拜有利主要是治疗什么| 戒指戴左手食指是什么意思| 5月11日什么星座| 秘密是什么意思| 老是低血糖是什么原因| 1905年属什么生肖| 打开图片用什么软件| 前胸后背长痘痘用什么药| 1964属什么| 落枕吃什么药| 百香果的籽有什么功效| hpv感染是什么意思| 小孩咳嗽是什么原因引起的| 女属蛇的和什么属相最配| cco是什么意思| 宫腔镜是什么| 尿酸高不能吃什么蔬菜| 喝酒不能吃什么药| 尿频尿急尿不尽吃什么药| 豆沙馅可以做什么美食| 出家需要什么条件| 张柏芝什么星座| 泡饭为什么对胃不好| 羁押是什么意思| 小孩子黑眼圈重是什么原因| 虫草吃了有什么好处| 撕脱性骨折是什么意思| 驱除鞑虏是什么意思| 津津有味什么意思| 妇科炎症用什么药最好| 有机酸是什么| 松鼠尾巴像什么| 水仙茶属于什么茶| 食管鳞状上皮增生是什么意思| 蒲地蓝消炎片治什么病| 月经量少吃什么药| 杏色配什么颜色好看| 羊胡子疮用什么药膏| 慢性肠炎吃什么药| 打哈哈是什么意思| 谷丙转氨酶什么意思| 旻什么意思| 胃肠感冒什么症状| 属鼠适合佩戴什么饰品| 水和什么相生| 8月2号是什么星座| 春宵一刻值千金是什么意思| 男孩子断掌有什么说法| 世界上最大的动物是什么| 脾胃湿热喝什么茶| 92年的属什么生肖| 左手发麻是什么病征兆| 耳根疼是什么原因| 什么叫湿热| 朴实无华是什么意思| 父亲生日送什么礼物| 亮晶晶的什么填空| 呵呵是什么意思啊| 辛弃疾字什么号什么| 屁股上的骨头叫什么骨| 脉搏强劲有力代表什么| 四维彩超是检查什么| 男士吃什么壮阳最厉害| 双肺索条灶是什么意思| 已故是什么意思| 克加寸念什么| 多五行属什么| 高血压吃什么水果好| 时值是什么意思| 双子座是什么星象| 看胸挂什么科| 备孕检查挂什么科| edf是什么意思| 月经血量少是什么原因| 一什么荷叶| 农历10月是什么月| 什么尾巴长不了| 藏语扎西德勒是什么意思| 诺如病毒吃什么药好得快一点| 过期的洗面奶可以用来做什么| 球蛋白是什么| 腹膜转移是什么意思| 吃什么药死的快| 贴膏药发热是什么原因| 鸡拉绿色粪便是什么病| 同样的药为什么价格相差很多| 结婚五周年是什么婚| 头皮屑大块是什么原因| 总胆红素偏高吃什么药| 平的反义词是什么| 火龙果有什么营养| 足下生辉是什么意思| 治疗狐臭挂什么科| 口臭用什么牙膏| 谁与争锋是什么意思| 紫苏有什么作用| 蛋糕裙适合什么人穿| 泪目是什么意思| 化生是什么意思| 功能性消化不良是什么意思| 荷花象征什么| 料理是什么意思| 炖牛肉放什么佐料| 给孩子测骨龄应该挂什么科| 补肾壮阳吃什么效果好| 鼻子旁边有痣代表什么| 医院测视力挂什么科| 吃什么保养皮肤| 什么病可以申请低保| 孕妇梦见牛是什么意思| 栩是什么意思| 灵柩是什么意思| 肠道长息肉是什么原因造成的| 4.14是什么星座| 痞是什么意思| 什么食物降血压| 牙龈肿了吃什么消炎药| 尿道发炎吃什么药| 精索静脉曲张挂什么科| 鸽子和什么炖气血双补| 女人腰上有痣代表什么| 左下腹疼是什么原因| music什么意思| 宋江代表什么生肖| 强碱是什么| 总做噩梦是什么原因| 暖皮适合什么颜色衣服| 子时是什么生肖| 白凉粉是什么东西| 孩子为什么会得抽动症| 什么病不能熬夜| 出水痘能吃什么食物| 爆单是什么意思| 白细胞偏低是什么意思| 耳鸣有什么症状| 白芷炖肉起什么作用| 盐酸利多卡因是什么药| 蜻蜓点水的目的是什么| 印尼买什么比国内便宜| 王不见王是什么意思| 血压高是什么引起的| 不明原因发烧挂什么科| 自渎是什么意思| 淋巴是什么东西| 女性尿里带血是什么原因| 违拗是什么意思| 鱼鳞病是什么| 血管痉挛是什么症状| 天葵是什么| 腹部ct平扫能检查出什么| 开水烫了用什么紧急处理| 明目退翳什么意思| 沐沐是什么意思| 吃榴莲有什么好处| 海马炖什么好小孩长高| 息肉和囊肿有什么区别| 梦见金项链是什么意思| 四个月念什么| 甲功异常有什么症状| 什么花好看| 龙眼树上的臭虫叫什么| ecpm是什么意思| kenwood是什么牌子| 起死回生是什么生肖| 血糖高什么原因| 梦见野猪是什么预兆| 吃什么补脾虚| 血糖挂什么科| 教学相长是什么意思| 吃什么能减肥最快还能减全身| 朱砂属于五行属什么| 吃什么药不能献血| 头发硬适合什么发型| 胆识是什么意思| 捉摸不透是什么意思| 六娃的能力是什么| 吃什么可以祛斑| 桃子吃多了有什么坏处| 按摩有什么好处| 大学记过处分有什么影响| 体脂是什么意思| 什么是优质碳水| 美食家是什么意思| 女性外痔擦什么药膏好| 痛风吃什么药效果最好| 妨夫是什么意思| 止疼药吃多了有什么副作用| pdi是什么| 神经性皮炎用什么药膏| 绝育手术对女性有什么危害| 自助是什么意思| lamer是什么牌子| 沉贵宝是什么木| 后背发热是什么原因| 亢是什么意思| 割包为什么很多人后悔| 天罗地网是什么生肖| 低血压高是什么原因| 脑回路什么意思| vsop是什么酒| 梦见和妈妈吵架是什么意思| 二月一号是什么星座| 六味地黄丸治什么| 1942年属什么生肖属相| 木日念什么| 骨灰盒什么材质的好| 植树节什么时候| 爸爸的爸爸叫什么| 红烧鱼用什么鱼| 心脏跳的快吃什么药| 蛆长什么样| 盆腔炎有什么症状呢| 柚子什么时候成熟| 身上起红点是什么病| 棒棒糖是什么意思| 胰腺炎吃什么药| 头发斑秃是什么原因引起的| 凤尾是什么菜| 肝内胆管轻度扩张是什么意思| 脑供血不足吃什么药| 血红蛋白偏低的原因和危害是什么| 补硒有什么好处| 猪蹄炖什么| 水痘要注意什么| cas是什么| 什么果不能吃| 血管为什么是青色的| 水果的英文是什么| 文殊菩萨是管什么的| 干什么一天能挣1000元| 什么的爬| 乳腺钙化是什么意思啊| 情人眼里出西施是什么意思| 章鱼属于什么类动物| 为什么精子射不出来| 意念灰是什么意思| 什么钓鱼愿者上钩| 女人梦见自己掉牙齿是什么征兆| 金刚是什么意思| 未免是什么意思| 南京有什么好玩的| gh发什么音| 碱性磷酸酶偏低是什么原因| 百度

“浙江新媒体第一股”甬派传媒3月9日正式挂牌新三板


Directory: ../../../ffmpeg/
File: src/libavutil/tests/aes_ctr.c
Date: 2025-08-05 11:35:17
Exec Total Coverage
Lines: 33 40 82.5%
Functions: 1 1 100.0%
Branches: 14 20 70.0%

Line Branch Exec Source
1 /*
2 * This file is part of FFmpeg.
3 *
4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with FFmpeg; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19 #include <string.h>
20
21 #include "libavutil/random_seed.h"
22 #include "libavutil/log.h"
23 #include "libavutil/mem_internal.h"
24 #include "libavutil/aes_ctr.h"
25
26 static const DECLARE_ALIGNED(8, uint8_t, plain)[] = {
27 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x72, 0x61, 0x6e, 0x64, 0x6f,
28 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x72, 0x61, 0x6e, 0x64, 0x6f
29 };
30
31 static const DECLARE_ALIGNED(8, uint8_t, encrypted)[] = {
32 0x95, 0xcd, 0x9a, 0x8a, 0x83, 0xa2, 0x1a, 0x84, 0x92, 0xed,
33 0xd6, 0xf2, 0x57, 0x2f, 0x61, 0x98, 0xbc, 0x20, 0x98, 0xee
34 };
35
36 static const DECLARE_ALIGNED(8, uint8_t, fixed_iv)[] = {
37 0xde, 0xad, 0xbe, 0xef, 0xde, 0xad, 0xbe, 0xef
38 };
39
40 static const DECLARE_ALIGNED(8, uint8_t, fixed_key)[] = {
41 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
42 0x38, 0x39, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66
43 };
44
45 static DECLARE_ALIGNED(8, uint32_t, key)[4];
46
47 static DECLARE_ALIGNED(8, uint8_t, tmp)[20];
48
49 1 int main (void)
50 {
51 1 int ret = 1;
52 struct AVAESCTR *ae, *ad;
53 const uint8_t *iv, *k;
54
55
2/2
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 1 times.
3 for (int i = 0; i < 2; i++) {
56 2 ae = av_aes_ctr_alloc();
57 2 ad = av_aes_ctr_alloc();
58
59
2/4
✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 2 times.
2 if (!ae || !ad)
60 goto ERROR;
61
62
2/2
✓ Branch 0 taken 1 times.
✓ Branch 1 taken 1 times.
2 if (i)
63 1 k = fixed_key;
64 else {
65 // Note: av_random_bytes() should be used in a real world scenario,
66 // but since that function can fail, av_get_random_seed() is used
67 // here for the purpose of this test, as its output is sufficient.
68 1 key[0] = av_get_random_seed();
69 1 key[1] = av_get_random_seed();
70 1 key[2] = av_get_random_seed();
71 1 key[3] = av_get_random_seed();
72 1 k = (uint8_t *)key;
73 }
74
75
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
2 if (av_aes_ctr_init(ae, k) < 0)
76 goto ERROR;
77
78
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
2 if (av_aes_ctr_init(ad, k) < 0)
79 goto ERROR;
80
81
2/2
✓ Branch 0 taken 1 times.
✓ Branch 1 taken 1 times.
2 if (i)
82 1 av_aes_ctr_set_iv(ae, fixed_iv);
83 else
84 1 av_aes_ctr_set_random_iv(ae);
85 2 iv = av_aes_ctr_get_iv(ae);
86 2 av_aes_ctr_set_full_iv(ad, iv);
87
88 2 av_aes_ctr_crypt(ae, tmp, plain, sizeof(tmp));
89
3/4
✓ Branch 0 taken 1 times.
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 1 times.
2 if (i && memcmp(tmp, encrypted, sizeof(tmp)) != 0) {
90 av_log(NULL, AV_LOG_ERROR, "test failed\n");
91 goto ERROR;
92 }
93
94 2 av_aes_ctr_crypt(ad, tmp, tmp, sizeof(tmp));
95
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
2 if (memcmp(tmp, plain, sizeof(tmp)) != 0){
96 av_log(NULL, AV_LOG_ERROR, "test failed\n");
97 goto ERROR;
98 }
99
100 2 av_aes_ctr_free(ae);
101 2 av_aes_ctr_free(ad);
102 2 ae = ad = NULL;
103 }
104
105 1 av_log(NULL, AV_LOG_INFO, "test passed\n");
106 1 ret = 0;
107
108 1 ERROR:
109 1 av_aes_ctr_free(ae);
110 1 av_aes_ctr_free(ad);
111 1 return ret;
112 }
113

高沫是什么茶 gsy什么意思 什么颜色显皮肤白 摩羯座后面是什么星座 13什么意思
下巴长痘痘是什么原因 2000年属龙的是什么命 病逝是什么意思 嗓子疼喝什么茶最有效 康庄大道是什么意思
人体缺硒会有什么症状 脱氢酶高是什么原因 人间正道是沧桑是什么意思 经常喝柠檬水有什么好处和坏处 627是什么意思
晚上看见蛇预示着什么 农历闰月有什么规律 有眼袋是什么原因 缺维生素会有什么症状 颈椎酸胀是什么原因
什么是兼职hcv8jop4ns1r.cn 黄瓜又什么又什么hcv8jop9ns6r.cn 血糖高的病人吃什么hcv8jop9ns0r.cn 豆粕是什么东西hcv8jop4ns4r.cn 恭候是什么意思hcv9jop1ns1r.cn
吐黑水是什么原因hcv7jop6ns3r.cn 宝宝便秘吃什么hcv9jop7ns4r.cn 甲硝唑有什么副作用hcv9jop1ns9r.cn 乳铁蛋白对宝宝有什么好处gangsutong.com 姑妈的老公叫什么tiangongnft.com
mva是什么单位hcv7jop4ns7r.cn 牙齿打桩是什么意思hcv7jop5ns6r.cn 大小便失禁是什么原因造成的hcv7jop9ns5r.cn 岔气吃什么药hcv8jop3ns3r.cn 终板炎是什么病hcv7jop7ns4r.cn
奇的多音字是什么hcv9jop3ns0r.cn 什么叫肺结节hcv8jop7ns2r.cn epr是什么hcv8jop3ns4r.cn 医院康复科是干什么的qingzhougame.com 手脚发热是什么原因hcv9jop0ns5r.cn
百度