Lines Matching defs:sctx
23 struct sha256_state *sctx = shash_desc_ctx(desc);
25 sha224_init(sctx);
31 struct sha256_state *sctx = shash_desc_ctx(desc);
33 sha256_init(sctx);
42 struct sha256_state *sctx = shash_desc_ctx(desc);
43 unsigned int partial = sctx->count % SHA256_BLOCK_SIZE;
45 sctx->count += len;
53 memcpy(sctx->buf + partial, data, p);
57 block_fn(sctx, sctx->buf, 1);
64 block_fn(sctx, data, blocks);
70 memcpy(sctx->buf + partial, data, len);
79 struct sha256_state *sctx = shash_desc_ctx(desc);
80 __be64 *bits = (__be64 *)(sctx->buf + bit_offset);
81 unsigned int partial = sctx->count % SHA256_BLOCK_SIZE;
83 sctx->buf[partial++] = 0x80;
85 memset(sctx->buf + partial, 0x0, SHA256_BLOCK_SIZE - partial);
88 block_fn(sctx, sctx->buf, 1);
91 memset(sctx->buf + partial, 0x0, bit_offset - partial);
92 *bits = cpu_to_be64(sctx->count << 3);
93 block_fn(sctx, sctx->buf, 1);
101 struct sha256_state *sctx = shash_desc_ctx(desc);
106 put_unaligned_be32(sctx->state[i], digest++);
108 *sctx = (struct sha256_state){};