Lines Matching refs:rctx
258 struct rmd160_ctx *rctx = shash_desc_ctx(desc); in rmd160_init() local
260 rctx->byte_count = 0; in rmd160_init()
262 rctx->state[0] = RMD_H0; in rmd160_init()
263 rctx->state[1] = RMD_H1; in rmd160_init()
264 rctx->state[2] = RMD_H2; in rmd160_init()
265 rctx->state[3] = RMD_H3; in rmd160_init()
266 rctx->state[4] = RMD_H4; in rmd160_init()
268 memset(rctx->buffer, 0, sizeof(rctx->buffer)); in rmd160_init()
276 struct rmd160_ctx *rctx = shash_desc_ctx(desc); in rmd160_update() local
277 const u32 avail = sizeof(rctx->buffer) - (rctx->byte_count & 0x3f); in rmd160_update()
279 rctx->byte_count += len; in rmd160_update()
283 memcpy((char *)rctx->buffer + (sizeof(rctx->buffer) - avail), in rmd160_update()
288 memcpy((char *)rctx->buffer + (sizeof(rctx->buffer) - avail), in rmd160_update()
291 rmd160_transform(rctx->state, rctx->buffer); in rmd160_update()
295 while (len >= sizeof(rctx->buffer)) { in rmd160_update()
296 memcpy(rctx->buffer, data, sizeof(rctx->buffer)); in rmd160_update()
297 rmd160_transform(rctx->state, rctx->buffer); in rmd160_update()
298 data += sizeof(rctx->buffer); in rmd160_update()
299 len -= sizeof(rctx->buffer); in rmd160_update()
302 memcpy(rctx->buffer, data, len); in rmd160_update()
311 struct rmd160_ctx *rctx = shash_desc_ctx(desc); in rmd160_final() local
317 bits = cpu_to_le64(rctx->byte_count << 3); in rmd160_final()
320 index = rctx->byte_count & 0x3f; in rmd160_final()
329 dst[i] = cpu_to_le32p(&rctx->state[i]); in rmd160_final()
332 memset(rctx, 0, sizeof(*rctx)); in rmd160_final()