Lines Matching defs:sctx

39 	struct sha256_state *sctx = shash_desc_ctx(desc);
41 memset(sctx, 0, sizeof *sctx);
43 sctx->state[0] = __cpu_to_be32(SHA256_H0);
44 sctx->state[1] = __cpu_to_be32(SHA256_H1);
45 sctx->state[2] = __cpu_to_be32(SHA256_H2);
46 sctx->state[3] = __cpu_to_be32(SHA256_H3);
47 sctx->state[4] = __cpu_to_be32(SHA256_H4);
48 sctx->state[5] = __cpu_to_be32(SHA256_H5);
49 sctx->state[6] = __cpu_to_be32(SHA256_H6);
50 sctx->state[7] = __cpu_to_be32(SHA256_H7);
51 sctx->count = 0;
59 struct sha256_state *sctx = shash_desc_ctx(desc);
68 u64 buf_len = (sctx->count % SHA256_BLOCK_SIZE);
76 total = (sctx->count % SHA256_BLOCK_SIZE) + len;
78 memcpy(sctx->buf + buf_len, data, len);
79 sctx->count += len;
83 memcpy(csbcpb->cpb.sha256.message_digest, sctx->state, SHA256_DIGEST_SIZE);
93 out_sg = nx_build_sg_list(nx_ctx->out_sg, (u8 *)sctx->state,
109 (u8 *) sctx->buf,
167 memcpy(sctx->buf, data, leftover);
169 sctx->count += len;
170 memcpy(sctx->state, csbcpb->cpb.sha256.message_digest, SHA256_DIGEST_SIZE);
178 struct sha256_state *sctx = shash_desc_ctx(desc);
196 if (sctx->count >= SHA256_BLOCK_SIZE) {
199 memcpy(csbcpb->cpb.sha256.input_partial_digest, sctx->state, SHA256_DIGEST_SIZE);
207 csbcpb->cpb.sha256.message_bit_length = (u64) (sctx->count * 8);
209 len = sctx->count & (SHA256_BLOCK_SIZE - 1);
210 in_sg = nx_build_sg_list(nx_ctx->in_sg, (u8 *) sctx->buf,
213 if (len != (sctx->count & (SHA256_BLOCK_SIZE - 1))) {
239 atomic64_add(sctx->count, &(nx_ctx->stats->sha256_bytes));
248 struct sha256_state *sctx = shash_desc_ctx(desc);
250 memcpy(out, sctx, sizeof(*sctx));
257 struct sha256_state *sctx = shash_desc_ctx(desc);
259 memcpy(sctx, in, sizeof(*sctx));