repo.or.cz
/
git
/
debian.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
builtin/receive-pack: use check_signature from gpg-interface
[git/debian.git]
/
compat
/
sha1-chunked.c
blob
6adfcfd54051617fd4cbdd0e5d8a904c2a839152
1
#include
"cache.h"
2
3
int
git_SHA1_Update_Chunked
(
platform_SHA_CTX
*
c
,
const void
*
data
,
size_t
len
)
4
{
5
size_t
nr
;
6
size_t
total
=
0
;
7
const char
*
cdata
= (
const char
*)
data
;
8
9
while
(
len
) {
10
nr
=
len
;
11
if
(
nr
>
SHA1_MAX_BLOCK_SIZE
)
12
nr
=
SHA1_MAX_BLOCK_SIZE
;
13
platform_SHA1_Update
(
c
,
cdata
,
nr
);
14
total
+=
nr
;
15
cdata
+=
nr
;
16
len
-=
nr
;
17
}
18
return
total
;
19
}