Lines Matching refs:curlen
314 unsigned long state[8], curlen; member
397 md->curlen = 0; in my_sha256_init()
425 if(md->curlen > sizeof(md->buf)) in my_sha256_update()
428 if(md->curlen == 0 && inlen >= CURL_SHA256_BLOCK_SIZE) { in my_sha256_update()
436 n = CURLMIN(inlen, (CURL_SHA256_BLOCK_SIZE - md->curlen)); in my_sha256_update()
437 memcpy(md->buf + md->curlen, in, n); in my_sha256_update()
438 md->curlen += n; in my_sha256_update()
441 if(md->curlen == CURL_SHA256_BLOCK_SIZE) { in my_sha256_update()
445 md->curlen = 0; in my_sha256_update()
462 if(md->curlen >= sizeof(md->buf)) in my_sha256_final()
466 md->length += md->curlen * 8; in my_sha256_final()
469 md->buf[md->curlen++] = (unsigned char)0x80; in my_sha256_final()
475 if(md->curlen > 56) { in my_sha256_final()
476 while(md->curlen < 64) { in my_sha256_final()
477 md->buf[md->curlen++] = (unsigned char)0; in my_sha256_final()
480 md->curlen = 0; in my_sha256_final()
484 while(md->curlen < 56) { in my_sha256_final()
485 md->buf[md->curlen++] = (unsigned char)0; in my_sha256_final()