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
ca2560df
Commit
ca2560df
authored
Jan 17, 2007
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
10l (aes_crypt -> av_aes_crypt)
Originally committed as revision 7559 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
d9319cce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
aes.c
libavutil/aes.c
+4
-4
aes.h
libavutil/aes.h
+1
-1
No files found.
libavutil/aes.c
View file @
ca2560df
...
...
@@ -85,7 +85,7 @@ static inline void crypt(AVAES *a, int s, uint8_t *sbox, uint32_t *multbl){
subshift
(
a
->
state
[
0
][
0
],
s
,
sbox
);
}
void
aes_crypt
(
AVAES
*
a
,
uint8_t
*
dst
,
uint8_t
*
src
,
int
count
,
uint8_t
*
iv
,
int
decrypt
){
void
a
v_a
es_crypt
(
AVAES
*
a
,
uint8_t
*
dst
,
uint8_t
*
src
,
int
count
,
uint8_t
*
iv
,
int
decrypt
){
while
(
count
--
){
addkey
(
a
->
state
[
1
],
src
,
a
->
round_key
[
a
->
rounds
]);
if
(
decrypt
)
{
...
...
@@ -212,7 +212,7 @@ int main(){
for
(
i
=
0
;
i
<
2
;
i
++
){
av_aes_init
(
&
b
,
rkey
[
i
],
128
,
1
);
aes_crypt
(
&
b
,
temp
,
rct
[
i
],
1
,
NULL
,
1
);
a
v_a
es_crypt
(
&
b
,
temp
,
rct
[
i
],
1
,
NULL
,
1
);
for
(
j
=
0
;
j
<
16
;
j
++
)
if
(
rpt
[
i
][
j
]
!=
temp
[
j
])
av_log
(
NULL
,
AV_LOG_ERROR
,
"%d %02X %02X
\n
"
,
j
,
rpt
[
i
][
j
],
temp
[
j
]);
...
...
@@ -223,10 +223,10 @@ int main(){
pt
[
j
]
=
random
();
}
{
START_TIMER
aes_crypt
(
&
ae
,
temp
,
pt
,
1
,
NULL
,
0
);
a
v_a
es_crypt
(
&
ae
,
temp
,
pt
,
1
,
NULL
,
0
);
if
(
!
(
i
&
(
i
-
1
)))
av_log
(
NULL
,
AV_LOG_ERROR
,
"%02X %02X %02X %02X
\n
"
,
temp
[
0
],
temp
[
5
],
temp
[
10
],
temp
[
15
]);
aes_crypt
(
&
ad
,
temp
,
temp
,
1
,
NULL
,
1
);
a
v_a
es_crypt
(
&
ad
,
temp
,
temp
,
1
,
NULL
,
1
);
STOP_TIMER
(
"aes"
)}
for
(
j
=
0
;
j
<
16
;
j
++
){
if
(
pt
[
j
]
!=
temp
[
j
]){
...
...
libavutil/aes.h
View file @
ca2560df
...
...
@@ -40,6 +40,6 @@ int av_aes_init(struct AVAES *a, uint8_t *key, int key_bits, int decrypt);
* @param iv initalization vector for CBC mode, if NULL then ECB will be used
* @param decrypt 0 for encryption, 1 for decryption
*/
void
aes_crypt
(
struct
AVAES
*
a
,
uint8_t
*
dst
,
uint8_t
*
src
,
int
count
,
uint8_t
*
iv
,
int
decrypt
);
void
a
v_a
es_crypt
(
struct
AVAES
*
a
,
uint8_t
*
dst
,
uint8_t
*
src
,
int
count
,
uint8_t
*
iv
,
int
decrypt
);
#endif
/* AES_H */
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