Lines Matching refs:curlen
76 __u32 state[8], curlen; member
121 md->sha256.curlen = 0; in sha256_init()
140 if (md->sha256.curlen == 0 && inlen >= SHA256_BLOCKSIZE) { in sha256_process()
146 n = MIN(inlen, (SHA256_BLOCKSIZE - md->sha256.curlen)); in sha256_process()
147 memcpy(md->sha256.buf + md->sha256.curlen, in, (size_t)n); in sha256_process()
148 md->sha256.curlen += n; in sha256_process()
151 if (md->sha256.curlen == SHA256_BLOCKSIZE) { in sha256_process()
154 md->sha256.curlen = 0; in sha256_process()
166 md->sha256.length += md->sha256.curlen * 8; in sha256_done()
169 md->sha256.buf[md->sha256.curlen++] = (unsigned char)0x80; in sha256_done()
175 if (md->sha256.curlen > 56) { in sha256_done()
176 while (md->sha256.curlen < 64) { in sha256_done()
177 md->sha256.buf[md->sha256.curlen++] = (unsigned char)0; in sha256_done()
180 md->sha256.curlen = 0; in sha256_done()
184 while (md->sha256.curlen < 56) { in sha256_done()
185 md->sha256.buf[md->sha256.curlen++] = (unsigned char)0; in sha256_done()