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
36c7fa7e
Commit
36c7fa7e
authored
Mar 13, 2007
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
smaller av_sha1_update()
Originally committed as revision 8381 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
104c30ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
sha1.c
libavutil/sha1.c
+10
-0
No files found.
libavutil/sha1.c
View file @
36c7fa7e
...
@@ -90,6 +90,15 @@ void av_sha1_update(AVSHA1* context, uint8_t* data, unsigned int len){
...
@@ -90,6 +90,15 @@ void av_sha1_update(AVSHA1* context, uint8_t* data, unsigned int len){
j
=
context
->
count
&
63
;
j
=
context
->
count
&
63
;
context
->
count
+=
len
;
context
->
count
+=
len
;
#ifdef CONFIG_SMALL
for
(
i
=
0
;
i
<
len
;
i
++
){
context
->
buffer
[
j
++
]
=
data
[
i
];
if
(
64
==
j
){
transform
(
context
->
state
,
context
->
buffer
);
j
=
0
;
}
}
#else
if
((
j
+
len
)
>
63
)
{
if
((
j
+
len
)
>
63
)
{
memcpy
(
&
context
->
buffer
[
j
],
data
,
(
i
=
64
-
j
));
memcpy
(
&
context
->
buffer
[
j
],
data
,
(
i
=
64
-
j
));
transform
(
context
->
state
,
context
->
buffer
);
transform
(
context
->
state
,
context
->
buffer
);
...
@@ -100,6 +109,7 @@ void av_sha1_update(AVSHA1* context, uint8_t* data, unsigned int len){
...
@@ -100,6 +109,7 @@ void av_sha1_update(AVSHA1* context, uint8_t* data, unsigned int len){
}
}
else
i
=
0
;
else
i
=
0
;
memcpy
(
&
context
->
buffer
[
j
],
&
data
[
i
],
len
-
i
);
memcpy
(
&
context
->
buffer
[
j
],
&
data
[
i
],
len
-
i
);
#endif
}
}
void
av_sha1_final
(
AVSHA1
*
context
,
uint8_t
digest
[
20
]){
void
av_sha1_final
(
AVSHA1
*
context
,
uint8_t
digest
[
20
]){
...
...
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