Lines Matching refs:sctx
49 static inline void ppc_sha1_clear_context(struct sha1_state *sctx) in ppc_sha1_clear_context() argument
52 u32 *ptr = (u32 *)sctx; in ppc_sha1_clear_context()
62 struct sha1_state *sctx = shash_desc_ctx(desc); in ppc_spe_sha1_update() local
63 const unsigned int offset = sctx->count & 0x3f; in ppc_spe_sha1_update()
69 sctx->count += len; in ppc_spe_sha1_update()
70 memcpy((char *)sctx->buffer + offset, src, len); in ppc_spe_sha1_update()
74 sctx->count += len; in ppc_spe_sha1_update()
77 memcpy((char *)sctx->buffer + offset, src, avail); in ppc_spe_sha1_update()
80 ppc_spe_sha1_transform(sctx->state, (const u8 *)sctx->buffer, 1); in ppc_spe_sha1_update()
92 ppc_spe_sha1_transform(sctx->state, src, bytes >> 6); in ppc_spe_sha1_update()
99 memcpy((char *)sctx->buffer, src, len); in ppc_spe_sha1_update()
105 struct sha1_state *sctx = shash_desc_ctx(desc); in ppc_spe_sha1_final() local
106 const unsigned int offset = sctx->count & 0x3f; in ppc_spe_sha1_final()
107 char *p = (char *)sctx->buffer + offset; in ppc_spe_sha1_final()
109 __be64 *pbits = (__be64 *)(((char *)&sctx->buffer) + 56); in ppc_spe_sha1_final()
119 ppc_spe_sha1_transform(sctx->state, sctx->buffer, 1); in ppc_spe_sha1_final()
120 p = (char *)sctx->buffer; in ppc_spe_sha1_final()
125 *pbits = cpu_to_be64(sctx->count << 3); in ppc_spe_sha1_final()
126 ppc_spe_sha1_transform(sctx->state, sctx->buffer, 1); in ppc_spe_sha1_final()
130 dst[0] = cpu_to_be32(sctx->state[0]); in ppc_spe_sha1_final()
131 dst[1] = cpu_to_be32(sctx->state[1]); in ppc_spe_sha1_final()
132 dst[2] = cpu_to_be32(sctx->state[2]); in ppc_spe_sha1_final()
133 dst[3] = cpu_to_be32(sctx->state[3]); in ppc_spe_sha1_final()
134 dst[4] = cpu_to_be32(sctx->state[4]); in ppc_spe_sha1_final()
136 ppc_sha1_clear_context(sctx); in ppc_spe_sha1_final()
142 struct sha1_state *sctx = shash_desc_ctx(desc); in ppc_spe_sha1_export() local
144 memcpy(out, sctx, sizeof(*sctx)); in ppc_spe_sha1_export()
150 struct sha1_state *sctx = shash_desc_ctx(desc); in ppc_spe_sha1_import() local
152 memcpy(sctx, in, sizeof(*sctx)); in ppc_spe_sha1_import()