Lines Matching defs:sctx
23 struct sha1_state *sctx = shash_desc_ctx(desc);
25 sctx->state[0] = SHA1_H0;
26 sctx->state[1] = SHA1_H1;
27 sctx->state[2] = SHA1_H2;
28 sctx->state[3] = SHA1_H3;
29 sctx->state[4] = SHA1_H4;
30 sctx->count = 0;
40 struct sha1_state *sctx = shash_desc_ctx(desc);
41 unsigned int partial = sctx->count % SHA1_BLOCK_SIZE;
43 sctx->count += len;
51 memcpy(sctx->buffer + partial, data, p);
55 block_fn(sctx, sctx->buffer, 1);
62 block_fn(sctx, data, blocks);
68 memcpy(sctx->buffer + partial, data, len);
77 struct sha1_state *sctx = shash_desc_ctx(desc);
78 __be64 *bits = (__be64 *)(sctx->buffer + bit_offset);
79 unsigned int partial = sctx->count % SHA1_BLOCK_SIZE;
81 sctx->buffer[partial++] = 0x80;
83 memset(sctx->buffer + partial, 0x0, SHA1_BLOCK_SIZE - partial);
86 block_fn(sctx, sctx->buffer, 1);
89 memset(sctx->buffer + partial, 0x0, bit_offset - partial);
90 *bits = cpu_to_be64(sctx->count << 3);
91 block_fn(sctx, sctx->buffer, 1);
98 struct sha1_state *sctx = shash_desc_ctx(desc);
103 put_unaligned_be32(sctx->state[i], digest++);
105 memzero_explicit(sctx, sizeof(*sctx));