Lines Matching refs:curlen
166 md->curlen = 0; in sha512_init()
191 if (md->curlen >= sizeof(md->buf)) in sha512_process()
195 if (md->curlen == 0 && inlen >= SHA512_BLOCK_SIZE) { in sha512_process()
202 n = MIN(inlen, (SHA512_BLOCK_SIZE - md->curlen)); in sha512_process()
203 os_memcpy(md->buf + md->curlen, in, n); in sha512_process()
204 md->curlen += n; in sha512_process()
207 if (md->curlen == SHA512_BLOCK_SIZE) { in sha512_process()
211 md->curlen = 0; in sha512_process()
230 if (md->curlen >= sizeof(md->buf)) in sha512_done()
234 md->length += md->curlen * CONST64(8); in sha512_done()
237 md->buf[md->curlen++] = (unsigned char) 0x80; in sha512_done()
243 if (md->curlen > 112) { in sha512_done()
244 while (md->curlen < 128) { in sha512_done()
245 md->buf[md->curlen++] = (unsigned char) 0; in sha512_done()
248 md->curlen = 0; in sha512_done()
255 while (md->curlen < 120) { in sha512_done()
256 md->buf[md->curlen++] = (unsigned char) 0; in sha512_done()