• Home
  • Raw
  • Download

Lines Matching refs:sctx

26 static inline void ppc_md5_clear_context(struct md5_state *sctx)  in ppc_md5_clear_context()  argument
29 u32 *ptr = (u32 *)sctx; in ppc_md5_clear_context()
38 struct md5_state *sctx = shash_desc_ctx(desc); in ppc_md5_init() local
40 sctx->hash[0] = MD5_H0; in ppc_md5_init()
41 sctx->hash[1] = MD5_H1; in ppc_md5_init()
42 sctx->hash[2] = MD5_H2; in ppc_md5_init()
43 sctx->hash[3] = MD5_H3; in ppc_md5_init()
44 sctx->byte_count = 0; in ppc_md5_init()
52 struct md5_state *sctx = shash_desc_ctx(desc); in ppc_md5_update() local
53 const unsigned int offset = sctx->byte_count & 0x3f; in ppc_md5_update()
57 sctx->byte_count += len; in ppc_md5_update()
60 memcpy((char *)sctx->block + offset, src, len); in ppc_md5_update()
65 memcpy((char *)sctx->block + offset, src, avail); in ppc_md5_update()
66 ppc_md5_transform(sctx->hash, (const u8 *)sctx->block, 1); in ppc_md5_update()
72 ppc_md5_transform(sctx->hash, src, len >> 6); in ppc_md5_update()
77 memcpy((char *)sctx->block, src, len); in ppc_md5_update()
83 struct md5_state *sctx = shash_desc_ctx(desc); in ppc_md5_final() local
84 const unsigned int offset = sctx->byte_count & 0x3f; in ppc_md5_final()
85 const u8 *src = (const u8 *)sctx->block; in ppc_md5_final()
88 __le64 *pbits = (__le64 *)((char *)sctx->block + 56); in ppc_md5_final()
95 ppc_md5_transform(sctx->hash, src, 1); in ppc_md5_final()
96 p = (char *)sctx->block; in ppc_md5_final()
101 *pbits = cpu_to_le64(sctx->byte_count << 3); in ppc_md5_final()
102 ppc_md5_transform(sctx->hash, src, 1); in ppc_md5_final()
104 dst[0] = cpu_to_le32(sctx->hash[0]); in ppc_md5_final()
105 dst[1] = cpu_to_le32(sctx->hash[1]); in ppc_md5_final()
106 dst[2] = cpu_to_le32(sctx->hash[2]); in ppc_md5_final()
107 dst[3] = cpu_to_le32(sctx->hash[3]); in ppc_md5_final()
109 ppc_md5_clear_context(sctx); in ppc_md5_final()
115 struct md5_state *sctx = shash_desc_ctx(desc); in ppc_md5_export() local
117 memcpy(out, sctx, sizeof(*sctx)); in ppc_md5_export()
123 struct md5_state *sctx = shash_desc_ctx(desc); in ppc_md5_import() local
125 memcpy(sctx, in, sizeof(*sctx)); in ppc_md5_import()