Lines Matching refs:curlen
161 u32 state[8], curlen; member
276 md->curlen = 0; in sha256_init()
301 if (md->curlen > sizeof(md->buf)) in sha256_process()
305 if (md->curlen == 0 && inlen >= block_size) { in sha256_process()
312 n = MIN(inlen, (block_size - md->curlen)); in sha256_process()
313 memcpy(md->buf + md->curlen, in, n); in sha256_process()
314 md->curlen += n; in sha256_process()
317 if (md->curlen == block_size) { in sha256_process()
321 md->curlen = 0; in sha256_process()
340 if (md->curlen >= sizeof(md->buf)) in sha256_done()
344 md->length += md->curlen * 8; in sha256_done()
347 md->buf[md->curlen++] = (unsigned char) 0x80; in sha256_done()
353 if (md->curlen > 56) { in sha256_done()
354 while (md->curlen < 64) { in sha256_done()
355 md->buf[md->curlen++] = (unsigned char) 0; in sha256_done()
358 md->curlen = 0; in sha256_done()
362 while (md->curlen < 56) { in sha256_done()
363 md->buf[md->curlen++] = (unsigned char) 0; in sha256_done()