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
476f9b74
Commit
476f9b74
authored
Mar 13, 2007
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify
Originally committed as revision 8376 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
f6a3477b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
sha1.c
libavutil/sha1.c
+5
-9
No files found.
libavutil/sha1.c
View file @
476f9b74
...
...
@@ -32,15 +32,7 @@ static void transform(uint32_t state[5], uint8_t buffer[64]){
unsigned
int
i
;
unsigned
int
a
,
b
,
c
,
d
,
e
;
#if defined (VARIANT2)
for
(
i
=
0
;
i
<
16
;
i
++
)
block
[
i
]
=
be2me_32
(((
uint32_t
*
)
buffer
)[
i
]);
for
(;
i
<
80
;
i
++
)
block
[
i
]
=
rol
(
block
[
i
-
3
]
^
block
[
i
-
8
]
^
block
[
i
-
14
]
^
block
[
i
-
16
],
1
);
#else
memcpy
(
block
,
buffer
,
64
);
#endif
a
=
state
[
0
];
b
=
state
[
1
];
...
...
@@ -49,7 +41,11 @@ static void transform(uint32_t state[5], uint8_t buffer[64]){
e
=
state
[
4
];
#ifdef VARIANT2
for
(
i
=
0
;
i
<
80
;
i
++
){
int
t
=
e
+
block
[
i
]
+
rol
(
a
,
5
);
int
t
;
if
(
i
<
16
)
t
=
be2me_32
(((
uint32_t
*
)
buffer
)[
i
]);
else
t
=
rol
(
block
[
i
-
3
]
^
block
[
i
-
8
]
^
block
[
i
-
14
]
^
block
[
i
-
16
],
1
);
block
[
i
]
=
t
;
t
+=
e
+
rol
(
a
,
5
);
if
(
i
<
40
){
if
(
i
<
20
)
t
+=
((
b
&
(
c
^
d
))
^
d
)
+
0x5A827999
;
else
t
+=
(
b
^
c
^
d
)
+
0x6ED9EBA1
;
...
...
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