Lines Matching refs:sctx
20 static inline void ppc_md5_clear_context(struct md5_state *sctx) in ppc_md5_clear_context() argument
23 u32 *ptr = (u32 *)sctx; in ppc_md5_clear_context()
32 struct md5_state *sctx = shash_desc_ctx(desc); in ppc_md5_init() local
34 sctx->hash[0] = MD5_H0; in ppc_md5_init()
35 sctx->hash[1] = MD5_H1; in ppc_md5_init()
36 sctx->hash[2] = MD5_H2; in ppc_md5_init()
37 sctx->hash[3] = MD5_H3; in ppc_md5_init()
38 sctx->byte_count = 0; in ppc_md5_init()
46 struct md5_state *sctx = shash_desc_ctx(desc); in ppc_md5_update() local
47 const unsigned int offset = sctx->byte_count & 0x3f; in ppc_md5_update()
51 sctx->byte_count += len; in ppc_md5_update()
54 memcpy((char *)sctx->block + offset, src, len); in ppc_md5_update()
59 memcpy((char *)sctx->block + offset, src, avail); in ppc_md5_update()
60 ppc_md5_transform(sctx->hash, (const u8 *)sctx->block, 1); in ppc_md5_update()
66 ppc_md5_transform(sctx->hash, src, len >> 6); in ppc_md5_update()
71 memcpy((char *)sctx->block, src, len); in ppc_md5_update()
77 struct md5_state *sctx = shash_desc_ctx(desc); in ppc_md5_final() local
78 const unsigned int offset = sctx->byte_count & 0x3f; in ppc_md5_final()
79 const u8 *src = (const u8 *)sctx->block; in ppc_md5_final()
82 __le64 *pbits = (__le64 *)((char *)sctx->block + 56); in ppc_md5_final()
89 ppc_md5_transform(sctx->hash, src, 1); in ppc_md5_final()
90 p = (char *)sctx->block; in ppc_md5_final()
95 *pbits = cpu_to_le64(sctx->byte_count << 3); in ppc_md5_final()
96 ppc_md5_transform(sctx->hash, src, 1); in ppc_md5_final()
98 dst[0] = cpu_to_le32(sctx->hash[0]); in ppc_md5_final()
99 dst[1] = cpu_to_le32(sctx->hash[1]); in ppc_md5_final()
100 dst[2] = cpu_to_le32(sctx->hash[2]); in ppc_md5_final()
101 dst[3] = cpu_to_le32(sctx->hash[3]); in ppc_md5_final()
103 ppc_md5_clear_context(sctx); in ppc_md5_final()
109 struct md5_state *sctx = shash_desc_ctx(desc); in ppc_md5_export() local
111 memcpy(out, sctx, sizeof(*sctx)); in ppc_md5_export()
117 struct md5_state *sctx = shash_desc_ctx(desc); in ppc_md5_import() local
119 memcpy(sctx, in, sizeof(*sctx)); in ppc_md5_import()