Lines Matching refs:sctx
22 struct sha1_state *sctx = shash_desc_ctx(desc);
24 sctx->state[0] = SHA1_H0;
25 sctx->state[1] = SHA1_H1;
26 sctx->state[2] = SHA1_H2;
27 sctx->state[3] = SHA1_H3;
28 sctx->state[4] = SHA1_H4;
29 sctx->count = 0;
39 struct sha1_state *sctx = shash_desc_ctx(desc);
40 unsigned int partial = sctx->count % SHA1_BLOCK_SIZE;
42 sctx->count += len;
50 memcpy(sctx->buffer + partial, data, p);
54 block_fn(sctx, sctx->buffer, 1);
61 block_fn(sctx, data, blocks);
67 memcpy(sctx->buffer + partial, data, len);
76 struct sha1_state *sctx = shash_desc_ctx(desc);
77 __be64 *bits = (__be64 *)(sctx->buffer + bit_offset);
78 unsigned int partial = sctx->count % SHA1_BLOCK_SIZE;
80 sctx->buffer[partial++] = 0x80;
82 memset(sctx->buffer + partial, 0x0, SHA1_BLOCK_SIZE - partial);
85 block_fn(sctx, sctx->buffer, 1);
88 memset(sctx->buffer + partial, 0x0, bit_offset - partial);
89 *bits = cpu_to_be64(sctx->count << 3);
90 block_fn(sctx, sctx->buffer, 1);
97 struct sha1_state *sctx = shash_desc_ctx(desc);
102 put_unaligned_be32(sctx->state[i], digest++);
104 *sctx = (struct sha1_state){};