Lines Matching refs:curlen
47 SHA1_INT32 state[5], curlen; member
199 sha1->curlen = 0; in sha1_init()
217 assert(sha1->curlen <= sizeof(sha1->buf)); in sha1_process()
220 if (sha1->curlen == 0 && inlen >= SHA1_BLOCKSIZE) { in sha1_process()
226 n = Py_MIN(inlen, (Py_ssize_t)(SHA1_BLOCKSIZE - sha1->curlen)); in sha1_process()
227 memcpy(sha1->buf + sha1->curlen, in, (size_t)n); in sha1_process()
228 sha1->curlen += (SHA1_INT32)n; in sha1_process()
231 if (sha1->curlen == SHA1_BLOCKSIZE) { in sha1_process()
234 sha1->curlen = 0; in sha1_process()
252 assert(sha1->curlen < sizeof(sha1->buf)); in sha1_done()
255 sha1->length += sha1->curlen * 8; in sha1_done()
258 sha1->buf[sha1->curlen++] = (unsigned char)0x80; in sha1_done()
264 if (sha1->curlen > 56) { in sha1_done()
265 while (sha1->curlen < 64) { in sha1_done()
266 sha1->buf[sha1->curlen++] = (unsigned char)0; in sha1_done()
269 sha1->curlen = 0; in sha1_done()
273 while (sha1->curlen < 56) { in sha1_done()
274 sha1->buf[sha1->curlen++] = (unsigned char)0; in sha1_done()