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
d43a2975
Commit
d43a2975
authored
Jan 14, 2007
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cosmetic
Originally committed as revision 7463 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
eade86e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
aes.c
libavutil/aes.c
+7
-7
No files found.
libavutil/aes.c
View file @
d43a2975
...
...
@@ -104,12 +104,12 @@ void av_aes_encrypt(AVAES *a){
}
// this is based on the reference AES code by Paulo Barreto and Vincent Rijmen
AVAES
*
av_aes_init
(
uint8_t
*
key
,
int
key
B
its
)
{
AVAES
*
av_aes_init
(
uint8_t
*
key
,
int
key
_b
its
)
{
AVAES
*
a
;
int
i
,
j
,
t
,
rconpointer
=
0
;
uint8_t
tk
[
8
][
4
];
int
KC
=
key
B
its
/
32
;
int
ROUNDS
=
KC
+
6
;
int
KC
=
key
_b
its
/
32
;
int
rounds
=
KC
+
6
;
if
(
!
sbox
[
255
]){
j
=
1
;
...
...
@@ -131,16 +131,16 @@ AVAES *av_aes_init(uint8_t *key, int keyBits) {
}
}
if
(
key
Bits
!=
128
&&
keyBits
!=
192
&&
keyB
its
!=
256
)
if
(
key
_bits
!=
128
&&
key_bits
!=
192
&&
key_b
its
!=
256
)
return
NULL
;
a
=
av_malloc
(
sizeof
(
AVAES
));
a
->
rounds
=
ROUNDS
;
a
->
rounds
=
rounds
;
memcpy
(
tk
,
key
,
KC
*
4
);
for
(
t
=
0
;
t
<
(
ROUNDS
+
1
)
*
4
;
)
{
for
(
j
=
0
;
(
j
<
KC
)
&&
(
t
<
(
ROUNDS
+
1
)
*
4
);
j
++
,
t
++
)
for
(
t
=
0
;
t
<
(
rounds
+
1
)
*
4
;
)
{
for
(
j
=
0
;
(
j
<
KC
)
&&
(
t
<
(
rounds
+
1
)
*
4
);
j
++
,
t
++
)
for
(
i
=
0
;
i
<
4
;
i
++
)
a
->
round_key
[
0
][
t
][
i
]
=
tk
[
j
][
i
];
...
...
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