• Home
  • Raw
  • Download

Lines Matching refs:rctx

230 	struct rmd256_ctx *rctx = shash_desc_ctx(desc);  in rmd256_init()  local
232 rctx->byte_count = 0; in rmd256_init()
234 rctx->state[0] = RMD_H0; in rmd256_init()
235 rctx->state[1] = RMD_H1; in rmd256_init()
236 rctx->state[2] = RMD_H2; in rmd256_init()
237 rctx->state[3] = RMD_H3; in rmd256_init()
238 rctx->state[4] = RMD_H5; in rmd256_init()
239 rctx->state[5] = RMD_H6; in rmd256_init()
240 rctx->state[6] = RMD_H7; in rmd256_init()
241 rctx->state[7] = RMD_H8; in rmd256_init()
243 memset(rctx->buffer, 0, sizeof(rctx->buffer)); in rmd256_init()
251 struct rmd256_ctx *rctx = shash_desc_ctx(desc); in rmd256_update() local
252 const u32 avail = sizeof(rctx->buffer) - (rctx->byte_count & 0x3f); in rmd256_update()
254 rctx->byte_count += len; in rmd256_update()
258 memcpy((char *)rctx->buffer + (sizeof(rctx->buffer) - avail), in rmd256_update()
263 memcpy((char *)rctx->buffer + (sizeof(rctx->buffer) - avail), in rmd256_update()
266 rmd256_transform(rctx->state, rctx->buffer); in rmd256_update()
270 while (len >= sizeof(rctx->buffer)) { in rmd256_update()
271 memcpy(rctx->buffer, data, sizeof(rctx->buffer)); in rmd256_update()
272 rmd256_transform(rctx->state, rctx->buffer); in rmd256_update()
273 data += sizeof(rctx->buffer); in rmd256_update()
274 len -= sizeof(rctx->buffer); in rmd256_update()
277 memcpy(rctx->buffer, data, len); in rmd256_update()
286 struct rmd256_ctx *rctx = shash_desc_ctx(desc); in rmd256_final() local
292 bits = cpu_to_le64(rctx->byte_count << 3); in rmd256_final()
295 index = rctx->byte_count & 0x3f; in rmd256_final()
304 dst[i] = cpu_to_le32p(&rctx->state[i]); in rmd256_final()
307 memset(rctx, 0, sizeof(*rctx)); in rmd256_final()