Lines Matching defs:sctx

44 	struct sha256_state_be *sctx = shash_desc_ctx(desc);
46 memset(sctx, 0, sizeof *sctx);
48 sctx->state[0] = __cpu_to_be32(SHA256_H0);
49 sctx->state[1] = __cpu_to_be32(SHA256_H1);
50 sctx->state[2] = __cpu_to_be32(SHA256_H2);
51 sctx->state[3] = __cpu_to_be32(SHA256_H3);
52 sctx->state[4] = __cpu_to_be32(SHA256_H4);
53 sctx->state[5] = __cpu_to_be32(SHA256_H5);
54 sctx->state[6] = __cpu_to_be32(SHA256_H6);
55 sctx->state[7] = __cpu_to_be32(SHA256_H7);
56 sctx->count = 0;
64 struct sha256_state_be *sctx = shash_desc_ctx(desc);
73 u64 buf_len = (sctx->count % SHA256_BLOCK_SIZE);
81 total = (sctx->count % SHA256_BLOCK_SIZE) + len;
83 memcpy(sctx->buf + buf_len, data, len);
84 sctx->count += len;
88 memcpy(csbcpb->cpb.sha256.message_digest, sctx->state, SHA256_DIGEST_SIZE);
98 out_sg = nx_build_sg_list(nx_ctx->out_sg, (u8 *)sctx->state,
114 (u8 *) sctx->buf,
172 memcpy(sctx->buf, data, leftover);
174 sctx->count += len;
175 memcpy(sctx->state, csbcpb->cpb.sha256.message_digest, SHA256_DIGEST_SIZE);
183 struct sha256_state_be *sctx = shash_desc_ctx(desc);
201 if (sctx->count >= SHA256_BLOCK_SIZE) {
204 memcpy(csbcpb->cpb.sha256.input_partial_digest, sctx->state, SHA256_DIGEST_SIZE);
212 csbcpb->cpb.sha256.message_bit_length = (u64) (sctx->count * 8);
214 len = sctx->count & (SHA256_BLOCK_SIZE - 1);
215 in_sg = nx_build_sg_list(nx_ctx->in_sg, (u8 *) sctx->buf,
218 if (len != (sctx->count & (SHA256_BLOCK_SIZE - 1))) {
244 atomic64_add(sctx->count, &(nx_ctx->stats->sha256_bytes));
253 struct sha256_state_be *sctx = shash_desc_ctx(desc);
255 memcpy(out, sctx, sizeof(*sctx));
262 struct sha256_state_be *sctx = shash_desc_ctx(desc);
264 memcpy(sctx, in, sizeof(*sctx));