Lines Matching refs:curlen
129 md->curlen = 0; in sha256_init()
153 if (md->curlen >= sizeof(md->buf)) in sha256_process()
157 if (md->curlen == 0 && inlen >= SHA256_BLOCK_SIZE) { in sha256_process()
164 n = MIN(inlen, (SHA256_BLOCK_SIZE - md->curlen)); in sha256_process()
165 os_memcpy(md->buf + md->curlen, in, n); in sha256_process()
166 md->curlen += n; in sha256_process()
169 if (md->curlen == SHA256_BLOCK_SIZE) { in sha256_process()
173 md->curlen = 0; in sha256_process()
192 if (md->curlen >= sizeof(md->buf)) in sha256_done()
196 md->length += md->curlen * 8; in sha256_done()
199 md->buf[md->curlen++] = (unsigned char) 0x80; in sha256_done()
205 if (md->curlen > 56) { in sha256_done()
206 while (md->curlen < SHA256_BLOCK_SIZE) { in sha256_done()
207 md->buf[md->curlen++] = (unsigned char) 0; in sha256_done()
210 md->curlen = 0; in sha256_done()
214 while (md->curlen < 56) { in sha256_done()
215 md->buf[md->curlen++] = (unsigned char) 0; in sha256_done()