Lines Matching refs:partial
44 unsigned int partial = sctx->count % SHA256_BLOCK_SIZE; in sha256_base_do_update() local
48 if (unlikely((partial + len) >= SHA256_BLOCK_SIZE)) { in sha256_base_do_update()
51 if (partial) { in sha256_base_do_update()
52 int p = SHA256_BLOCK_SIZE - partial; in sha256_base_do_update()
54 memcpy(sctx->buf + partial, data, p); in sha256_base_do_update()
68 partial = 0; in sha256_base_do_update()
71 memcpy(sctx->buf + partial, data, len); in sha256_base_do_update()
82 unsigned int partial = sctx->count % SHA256_BLOCK_SIZE; in sha256_base_do_finalize() local
84 sctx->buf[partial++] = 0x80; in sha256_base_do_finalize()
85 if (partial > bit_offset) { in sha256_base_do_finalize()
86 memset(sctx->buf + partial, 0x0, SHA256_BLOCK_SIZE - partial); in sha256_base_do_finalize()
87 partial = 0; in sha256_base_do_finalize()
92 memset(sctx->buf + partial, 0x0, bit_offset - partial); in sha256_base_do_finalize()