Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
2592438d
Commit
2592438d
authored
Jan 14, 2007
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 test vector
Originally committed as revision 7483 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
95d1236b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
aes.c
libavutil/aes.c
+11
-1
No files found.
libavutil/aes.c
View file @
2592438d
...
...
@@ -176,10 +176,20 @@ AVAES *av_aes_init(uint8_t *key, int key_bits) {
int
main
(){
int
i
,
j
,
k
;
AVAES
*
a
=
av_aes_init
(
"PI=3.141592654.."
,
128
);
uint8_t
ct
[
16
],
pt
[
16
],
key
[
32
];
uint8_t
zero
[
16
]
=
{
0
};
AVAES
*
b
=
av_aes_init
(
zero
,
128
);
uint8_t
pt
[
16
]
=
{
0x6a
,
0x84
,
0x86
,
0x7c
,
0xd7
,
0x7e
,
0x12
,
0xad
,
0x07
,
0xea
,
0x1b
,
0xe8
,
0x95
,
0xc5
,
0x3f
,
0xa3
};
uint8_t
ct
[
16
]
=
{
0x73
,
0x22
,
0x81
,
0xc0
,
0xa0
,
0xaa
,
0xb8
,
0xf7
,
0xa5
,
0x4a
,
0x0c
,
0x67
,
0xa0
,
0xc4
,
0x5e
,
0xcf
};
av_log_level
=
AV_LOG_DEBUG
;
memcpy
(
b
->
state
,
ct
,
16
);
av_aes_decrypt
(
b
);
for
(
j
=
0
;
j
<
16
;
j
++
)
if
(
pt
[
j
]
!=
b
->
state
[
0
][
j
]){
av_log
(
NULL
,
AV_LOG_ERROR
,
"%d %02X %02X
\n
"
,
j
,
pt
[
j
],
b
->
state
[
0
][
j
]);
}
for
(
i
=
0
;
i
<
10000
;
i
++
){
for
(
j
=
0
;
j
<
16
;
j
++
){
pt
[
j
]
=
random
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment