Lines Matching defs:sctx
50 static inline void ppc_sha256_clear_context(struct sha256_state *sctx)
53 u32 *ptr = (u32 *)sctx;
63 struct sha256_state *sctx = shash_desc_ctx(desc);
64 const unsigned int offset = sctx->count & 0x3f;
70 sctx->count += len;
71 memcpy((char *)sctx->buf + offset, src, len);
75 sctx->count += len;
78 memcpy((char *)sctx->buf + offset, src, avail);
81 ppc_spe_sha256_transform(sctx->state, (const u8 *)sctx->buf, 1);
94 ppc_spe_sha256_transform(sctx->state, src, bytes >> 6);
101 memcpy((char *)sctx->buf, src, len);
107 struct sha256_state *sctx = shash_desc_ctx(desc);
108 const unsigned int offset = sctx->count & 0x3f;
109 char *p = (char *)sctx->buf + offset;
111 __be64 *pbits = (__be64 *)(((char *)&sctx->buf) + 56);
121 ppc_spe_sha256_transform(sctx->state, sctx->buf, 1);
122 p = (char *)sctx->buf;
127 *pbits = cpu_to_be64(sctx->count << 3);
128 ppc_spe_sha256_transform(sctx->state, sctx->buf, 1);
132 dst[0] = cpu_to_be32(sctx->state[0]);
133 dst[1] = cpu_to_be32(sctx->state[1]);
134 dst[2] = cpu_to_be32(sctx->state[2]);
135 dst[3] = cpu_to_be32(sctx->state[3]);
136 dst[4] = cpu_to_be32(sctx->state[4]);
137 dst[5] = cpu_to_be32(sctx->state[5]);
138 dst[6] = cpu_to_be32(sctx->state[6]);
139 dst[7] = cpu_to_be32(sctx->state[7]);
141 ppc_sha256_clear_context(sctx);
168 struct sha256_state *sctx = shash_desc_ctx(desc);
170 memcpy(out, sctx, sizeof(*sctx));
176 struct sha256_state *sctx = shash_desc_ctx(desc);
178 memcpy(sctx, in, sizeof(*sctx));