Lines Matching defs:sctx
31 struct sha1_state *sctx = shash_desc_ctx(desc);
33 *sctx = (struct sha1_state){
40 static void __sha1_sparc64_update(struct sha1_state *sctx, const u8 *data,
45 sctx->count += len;
48 memcpy(sctx->buffer + partial, data, done);
49 sha1_sparc64_transform(sctx->state, sctx->buffer, 1);
54 sha1_sparc64_transform(sctx->state, data + done, rounds);
58 memcpy(sctx->buffer, data + done, len - done);
64 struct sha1_state *sctx = shash_desc_ctx(desc);
65 unsigned int partial = sctx->count % SHA1_BLOCK_SIZE;
69 sctx->count += len;
70 memcpy(sctx->buffer + partial, data, len);
72 __sha1_sparc64_update(sctx, data, len, partial);
80 struct sha1_state *sctx = shash_desc_ctx(desc);
86 bits = cpu_to_be64(sctx->count << 3);
89 index = sctx->count % SHA1_BLOCK_SIZE;
94 sctx->count += padlen;
95 memcpy(sctx->buffer + index, padding, padlen);
97 __sha1_sparc64_update(sctx, padding, padlen, index);
99 __sha1_sparc64_update(sctx, (const u8 *)&bits, sizeof(bits), 56);
103 dst[i] = cpu_to_be32(sctx->state[i]);
106 memset(sctx, 0, sizeof(*sctx));
113 struct sha1_state *sctx = shash_desc_ctx(desc);
115 memcpy(out, sctx, sizeof(*sctx));
122 struct sha1_state *sctx = shash_desc_ctx(desc);
124 memcpy(sctx, in, sizeof(*sctx));