• Home
  • Raw
  • Download

Lines Matching refs:sctx

54 static inline void ppc_sha256_clear_context(struct sha256_state *sctx)  in ppc_sha256_clear_context()  argument
57 u32 *ptr = (u32 *)sctx; in ppc_sha256_clear_context()
66 struct sha256_state *sctx = shash_desc_ctx(desc); in ppc_spe_sha256_init() local
68 sctx->state[0] = SHA256_H0; in ppc_spe_sha256_init()
69 sctx->state[1] = SHA256_H1; in ppc_spe_sha256_init()
70 sctx->state[2] = SHA256_H2; in ppc_spe_sha256_init()
71 sctx->state[3] = SHA256_H3; in ppc_spe_sha256_init()
72 sctx->state[4] = SHA256_H4; in ppc_spe_sha256_init()
73 sctx->state[5] = SHA256_H5; in ppc_spe_sha256_init()
74 sctx->state[6] = SHA256_H6; in ppc_spe_sha256_init()
75 sctx->state[7] = SHA256_H7; in ppc_spe_sha256_init()
76 sctx->count = 0; in ppc_spe_sha256_init()
83 struct sha256_state *sctx = shash_desc_ctx(desc); in ppc_spe_sha224_init() local
85 sctx->state[0] = SHA224_H0; in ppc_spe_sha224_init()
86 sctx->state[1] = SHA224_H1; in ppc_spe_sha224_init()
87 sctx->state[2] = SHA224_H2; in ppc_spe_sha224_init()
88 sctx->state[3] = SHA224_H3; in ppc_spe_sha224_init()
89 sctx->state[4] = SHA224_H4; in ppc_spe_sha224_init()
90 sctx->state[5] = SHA224_H5; in ppc_spe_sha224_init()
91 sctx->state[6] = SHA224_H6; in ppc_spe_sha224_init()
92 sctx->state[7] = SHA224_H7; in ppc_spe_sha224_init()
93 sctx->count = 0; in ppc_spe_sha224_init()
101 struct sha256_state *sctx = shash_desc_ctx(desc); in ppc_spe_sha256_update() local
102 const unsigned int offset = sctx->count & 0x3f; in ppc_spe_sha256_update()
108 sctx->count += len; in ppc_spe_sha256_update()
109 memcpy((char *)sctx->buf + offset, src, len); in ppc_spe_sha256_update()
113 sctx->count += len; in ppc_spe_sha256_update()
116 memcpy((char *)sctx->buf + offset, src, avail); in ppc_spe_sha256_update()
119 ppc_spe_sha256_transform(sctx->state, (const u8 *)sctx->buf, 1); in ppc_spe_sha256_update()
132 ppc_spe_sha256_transform(sctx->state, src, bytes >> 6); in ppc_spe_sha256_update()
139 memcpy((char *)sctx->buf, src, len); in ppc_spe_sha256_update()
145 struct sha256_state *sctx = shash_desc_ctx(desc); in ppc_spe_sha256_final() local
146 const unsigned int offset = sctx->count & 0x3f; in ppc_spe_sha256_final()
147 char *p = (char *)sctx->buf + offset; in ppc_spe_sha256_final()
149 __be64 *pbits = (__be64 *)(((char *)&sctx->buf) + 56); in ppc_spe_sha256_final()
159 ppc_spe_sha256_transform(sctx->state, sctx->buf, 1); in ppc_spe_sha256_final()
160 p = (char *)sctx->buf; in ppc_spe_sha256_final()
165 *pbits = cpu_to_be64(sctx->count << 3); in ppc_spe_sha256_final()
166 ppc_spe_sha256_transform(sctx->state, sctx->buf, 1); in ppc_spe_sha256_final()
170 dst[0] = cpu_to_be32(sctx->state[0]); in ppc_spe_sha256_final()
171 dst[1] = cpu_to_be32(sctx->state[1]); in ppc_spe_sha256_final()
172 dst[2] = cpu_to_be32(sctx->state[2]); in ppc_spe_sha256_final()
173 dst[3] = cpu_to_be32(sctx->state[3]); in ppc_spe_sha256_final()
174 dst[4] = cpu_to_be32(sctx->state[4]); in ppc_spe_sha256_final()
175 dst[5] = cpu_to_be32(sctx->state[5]); in ppc_spe_sha256_final()
176 dst[6] = cpu_to_be32(sctx->state[6]); in ppc_spe_sha256_final()
177 dst[7] = cpu_to_be32(sctx->state[7]); in ppc_spe_sha256_final()
179 ppc_sha256_clear_context(sctx); in ppc_spe_sha256_final()
206 struct sha256_state *sctx = shash_desc_ctx(desc); in ppc_spe_sha256_export() local
208 memcpy(out, sctx, sizeof(*sctx)); in ppc_spe_sha256_export()
214 struct sha256_state *sctx = shash_desc_ctx(desc); in ppc_spe_sha256_import() local
216 memcpy(sctx, in, sizeof(*sctx)); in ppc_spe_sha256_import()