Lines Matching refs:rctx
215 struct rmd128_ctx *rctx = shash_desc_ctx(desc); in rmd128_init() local
217 rctx->byte_count = 0; in rmd128_init()
219 rctx->state[0] = RMD_H0; in rmd128_init()
220 rctx->state[1] = RMD_H1; in rmd128_init()
221 rctx->state[2] = RMD_H2; in rmd128_init()
222 rctx->state[3] = RMD_H3; in rmd128_init()
224 memset(rctx->buffer, 0, sizeof(rctx->buffer)); in rmd128_init()
232 struct rmd128_ctx *rctx = shash_desc_ctx(desc); in rmd128_update() local
233 const u32 avail = sizeof(rctx->buffer) - (rctx->byte_count & 0x3f); in rmd128_update()
235 rctx->byte_count += len; in rmd128_update()
239 memcpy((char *)rctx->buffer + (sizeof(rctx->buffer) - avail), in rmd128_update()
244 memcpy((char *)rctx->buffer + (sizeof(rctx->buffer) - avail), in rmd128_update()
247 rmd128_transform(rctx->state, rctx->buffer); in rmd128_update()
251 while (len >= sizeof(rctx->buffer)) { in rmd128_update()
252 memcpy(rctx->buffer, data, sizeof(rctx->buffer)); in rmd128_update()
253 rmd128_transform(rctx->state, rctx->buffer); in rmd128_update()
254 data += sizeof(rctx->buffer); in rmd128_update()
255 len -= sizeof(rctx->buffer); in rmd128_update()
258 memcpy(rctx->buffer, data, len); in rmd128_update()
267 struct rmd128_ctx *rctx = shash_desc_ctx(desc); in rmd128_final() local
273 bits = cpu_to_le64(rctx->byte_count << 3); in rmd128_final()
276 index = rctx->byte_count & 0x3f; in rmd128_final()
285 dst[i] = cpu_to_le32p(&rctx->state[i]); in rmd128_final()
288 memset(rctx, 0, sizeof(*rctx)); in rmd128_final()