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
43bbc3f4
Commit
43bbc3f4
authored
Oct 08, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xtea: give constants the correct type
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
89074e90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
xtea.c
libavutil/xtea.c
+4
-4
No files found.
libavutil/xtea.c
View file @
43bbc3f4
...
...
@@ -50,7 +50,7 @@ static void xtea_crypt_ecb(AVXTEA *ctx, uint8_t *dst, const uint8_t *src,
if
(
decrypt
)
{
#if CONFIG_SMALL
int
i
;
uint32_t
delta
=
0x9E3779B9
,
sum
=
delta
*
32
;
uint32_t
delta
=
0x9E3779B9
U
,
sum
=
delta
*
32
;
for
(
i
=
0
;
i
<
32
;
i
++
)
{
v1
-=
(((
v0
<<
4
)
^
(
v0
>>
5
))
+
v0
)
^
(
sum
+
ctx
->
key
[(
sum
>>
11
)
&
3
]);
...
...
@@ -60,7 +60,7 @@ static void xtea_crypt_ecb(AVXTEA *ctx, uint8_t *dst, const uint8_t *src,
#else
#define DSTEP(SUM, K0, K1) \
v1 -= (((v0 << 4) ^ (v0 >> 5)) + v0) ^ (SUM + K0); \
v0 -= (((v1 << 4) ^ (v1 >> 5)) + v1) ^ (SUM - 0x9E3779B9 + K1)
v0 -= (((v1 << 4) ^ (v1 >> 5)) + v1) ^ (SUM - 0x9E3779B9
U
+ K1)
DSTEP
(
0xC6EF3720U
,
k2
,
k3
);
DSTEP
(
0x28B7BD67U
,
k3
,
k2
);
...
...
@@ -103,7 +103,7 @@ static void xtea_crypt_ecb(AVXTEA *ctx, uint8_t *dst, const uint8_t *src,
}
else
{
#if CONFIG_SMALL
int
i
;
uint32_t
sum
=
0
,
delta
=
0x9E3779B9
;
uint32_t
sum
=
0
,
delta
=
0x9E3779B9
U
;
for
(
i
=
0
;
i
<
32
;
i
++
)
{
v0
+=
(((
v1
<<
4
)
^
(
v1
>>
5
))
+
v1
)
^
(
sum
+
ctx
->
key
[
sum
&
3
]);
...
...
@@ -113,7 +113,7 @@ static void xtea_crypt_ecb(AVXTEA *ctx, uint8_t *dst, const uint8_t *src,
#else
#define ESTEP(SUM, K0, K1) \
v0 += (((v1 << 4) ^ (v1 >> 5)) + v1) ^ (SUM + K0);\
v1 += (((v0 << 4) ^ (v0 >> 5)) + v0) ^ (SUM + 0x9E3779B9 + K1)
v1 += (((v0 << 4) ^ (v0 >> 5)) + v0) ^ (SUM + 0x9E3779B9
U
+ K1)
ESTEP
(
0x00000000U
,
k0
,
k3
);
ESTEP
(
0x9E3779B9U
,
k1
,
k2
);
ESTEP
(
0x3C6EF372U
,
k2
,
k1
);
...
...
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