312
313
314
315
316
317
318
319
320
321
322
323
324
325
|
/*
** Add the content of a blob to the incremental MD5 checksum.
*/
void md5sum_step_blob(Blob *p){
md5sum_step_text(blob_buffer(p), blob_size(p));
}
/*
** Finish the incremental MD5 checksum. Store the result in blob pOut
** if pOut!=0. Also return a pointer to the result.
**
** This resets the incremental checksum preparing for the next round
** of computation. The return pointer points to a static buffer that
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
|
/*
** Add the content of a blob to the incremental MD5 checksum.
*/
void md5sum_step_blob(Blob *p){
md5sum_step_text(blob_buffer(p), blob_size(p));
}
/*
** For trouble-shooting only:
**
** Report the current state of the incremental checksum.
*/
const char *md5sum_current_state(void){
unsigned int cksum = 0;
unsigned int *pFirst, *pLast;
static char zResult[12];
pFirst = (unsigned int*)&incrCtx;
pLast = (unsigned int*)((&incrCtx)+1);
while( pFirst<pLast ){
cksum += *pFirst;
pFirst++;
}
sqlite3_snprintf(sizeof(zResult), zResult, "%08x", cksum);
return zResult;
}
/*
** Finish the incremental MD5 checksum. Store the result in blob pOut
** if pOut!=0. Also return a pointer to the result.
**
** This resets the incremental checksum preparing for the next round
** of computation. The return pointer points to a static buffer that
|