Lines Matching refs:curlen
95 unsigned long state[8], curlen; member
165 md->curlen = 0; in SHA256_Init()
189 if(md->curlen > sizeof(md->buf)) in SHA256_Update()
192 if(md->curlen == 0 && inlen >= block_size) { in SHA256_Update()
200 n = CURLMIN(inlen, (block_size - md->curlen)); in SHA256_Update()
201 memcpy(md->buf + md->curlen, in, n); in SHA256_Update()
202 md->curlen += n; in SHA256_Update()
205 if(md->curlen == block_size) { in SHA256_Update()
209 md->curlen = 0; in SHA256_Update()
225 if(md->curlen >= sizeof(md->buf)) in SHA256_Final()
228 md->length += md->curlen * 8; in SHA256_Final()
230 md->buf[md->curlen++] = (unsigned char)0x80; in SHA256_Final()
235 if(md->curlen > 56) { in SHA256_Final()
236 while(md->curlen < 64) { in SHA256_Final()
237 md->buf[md->curlen++] = (unsigned char)0; in SHA256_Final()
240 md->curlen = 0; in SHA256_Final()
243 while(md->curlen < 56) { in SHA256_Final()
244 md->buf[md->curlen++] = (unsigned char)0; in SHA256_Final()