1#include "cache.h"
23
int git_SHA1_Update_Chunked(platform_SHA_CTX *c, const void *data, size_t len)
4{
5size_t nr;
6size_t total = 0;
7const char *cdata = (const char*)data;
89
while (len) {
10nr = len;
11if (nr > SHA1_MAX_BLOCK_SIZE)
12nr = SHA1_MAX_BLOCK_SIZE;
13platform_SHA1_Update(c, cdata, nr);
14total += nr;
15cdata += nr;
16len -= nr;
17}
18return total;
19}