Lines Matching defs:sctx
235 struct sha256_ctx *sctx = crypto_tfm_ctx(tfm);
236 sctx->state[0] = H0;
237 sctx->state[1] = H1;
238 sctx->state[2] = H2;
239 sctx->state[3] = H3;
240 sctx->state[4] = H4;
241 sctx->state[5] = H5;
242 sctx->state[6] = H6;
243 sctx->state[7] = H7;
244 sctx->count[0] = sctx->count[1] = 0;
250 struct sha256_ctx *sctx = crypto_tfm_ctx(tfm);
254 index = (unsigned int)((sctx->count[0] >> 3) & 0x3f);
257 if ((sctx->count[0] += (len << 3)) < (len << 3)) {
258 sctx->count[1]++;
259 sctx->count[1] += (len >> 29);
266 memcpy(&sctx->buf[index], data, part_len);
267 sha256_transform(sctx->state, sctx->buf);
270 sha256_transform(sctx->state, &data[i]);
277 memcpy(&sctx->buf[index], &data[i], len-i);
282 struct sha256_ctx *sctx = crypto_tfm_ctx(tfm);
290 bits[1] = cpu_to_be32(sctx->count[0]);
291 bits[0] = cpu_to_be32(sctx->count[1]);
294 index = (sctx->count[0] >> 3) & 0x3f;
303 dst[i] = cpu_to_be32(sctx->state[i]);
306 memset(sctx, 0, sizeof(*sctx));