Lines Matching defs:sctx

39 	struct sha512_state *sctx = shash_desc_ctx(desc);
41 memset(sctx, 0, sizeof *sctx);
43 sctx->state[0] = __cpu_to_be64(SHA512_H0);
44 sctx->state[1] = __cpu_to_be64(SHA512_H1);
45 sctx->state[2] = __cpu_to_be64(SHA512_H2);
46 sctx->state[3] = __cpu_to_be64(SHA512_H3);
47 sctx->state[4] = __cpu_to_be64(SHA512_H4);
48 sctx->state[5] = __cpu_to_be64(SHA512_H5);
49 sctx->state[6] = __cpu_to_be64(SHA512_H6);
50 sctx->state[7] = __cpu_to_be64(SHA512_H7);
51 sctx->count[0] = 0;
59 struct sha512_state *sctx = shash_desc_ctx(desc);
68 u64 buf_len = (sctx->count[0] % SHA512_BLOCK_SIZE);
76 total = (sctx->count[0] % SHA512_BLOCK_SIZE) + len;
78 memcpy(sctx->buf + buf_len, data, len);
79 sctx->count[0] += len;
83 memcpy(csbcpb->cpb.sha512.message_digest, sctx->state, SHA512_DIGEST_SIZE);
93 out_sg = nx_build_sg_list(nx_ctx->out_sg, (u8 *)sctx->state,
109 (u8 *) sctx->buf,
171 memcpy(sctx->buf, data, leftover);
172 sctx->count[0] += len;
173 memcpy(sctx->state, csbcpb->cpb.sha512.message_digest, SHA512_DIGEST_SIZE);
181 struct sha512_state *sctx = shash_desc_ctx(desc);
200 if (sctx->count[0] >= SHA512_BLOCK_SIZE) {
203 memcpy(csbcpb->cpb.sha512.input_partial_digest, sctx->state,
214 count0 = sctx->count[0] * 8;
218 len = sctx->count[0] & (SHA512_BLOCK_SIZE - 1);
219 in_sg = nx_build_sg_list(nx_ctx->in_sg, sctx->buf, &len,
222 if (len != (sctx->count[0] & (SHA512_BLOCK_SIZE - 1))) {
244 atomic64_add(sctx->count[0], &(nx_ctx->stats->sha512_bytes));
254 struct sha512_state *sctx = shash_desc_ctx(desc);
256 memcpy(out, sctx, sizeof(*sctx));
263 struct sha512_state *sctx = shash_desc_ctx(desc);
265 memcpy(sctx, in, sizeof(*sctx));