• Home
  • Raw
  • Download

Lines Matching refs:bufcnt

101 		index = rctx->bufcnt & 0x3f;  in aspeed_ahash_fill_padding()
103 *(rctx->buffer + rctx->bufcnt) = 0x80; in aspeed_ahash_fill_padding()
104 memset(rctx->buffer + rctx->bufcnt + 1, 0, padlen - 1); in aspeed_ahash_fill_padding()
105 memcpy(rctx->buffer + rctx->bufcnt + padlen, bits, 8); in aspeed_ahash_fill_padding()
106 rctx->bufcnt += padlen + 8; in aspeed_ahash_fill_padding()
112 index = rctx->bufcnt & 0x7f; in aspeed_ahash_fill_padding()
114 *(rctx->buffer + rctx->bufcnt) = 0x80; in aspeed_ahash_fill_padding()
115 memset(rctx->buffer + rctx->bufcnt + 1, 0, padlen - 1); in aspeed_ahash_fill_padding()
116 memcpy(rctx->buffer + rctx->bufcnt + padlen, bits, 16); in aspeed_ahash_fill_padding()
117 rctx->bufcnt += padlen + 16; in aspeed_ahash_fill_padding()
133 length = rctx->total + rctx->bufcnt; in aspeed_ahash_dma_prepare()
138 if (rctx->bufcnt) in aspeed_ahash_dma_prepare()
139 memcpy(hash_engine->ahash_src_addr, rctx->buffer, rctx->bufcnt); in aspeed_ahash_dma_prepare()
141 if (rctx->total + rctx->bufcnt < ASPEED_CRYPTO_SRC_DMA_BUF_LEN) { in aspeed_ahash_dma_prepare()
143 rctx->bufcnt, rctx->src_sg, in aspeed_ahash_dma_prepare()
155 rctx->bufcnt = remain; in aspeed_ahash_dma_prepare()
185 remain = (rctx->total + rctx->bufcnt) % rctx->block_size; in aspeed_ahash_dma_prepare_sg()
186 length = rctx->total + rctx->bufcnt - remain; in aspeed_ahash_dma_prepare_sg()
189 "rctx total", rctx->total, "bufcnt", rctx->bufcnt, in aspeed_ahash_dma_prepare_sg()
210 if (rctx->bufcnt != 0) { in aspeed_ahash_dma_prepare_sg()
225 len = rctx->bufcnt; in aspeed_ahash_dma_prepare_sg()
262 hash_engine->src_length = rctx->total + rctx->bufcnt - remain; in aspeed_ahash_dma_prepare_sg()
269 if (rctx->bufcnt != 0) in aspeed_ahash_dma_prepare_sg()
379 rctx->bufcnt = rctx->block_size + rctx->digsize; in aspeed_ahash_hmac_resume()
404 hash_engine->src_length = rctx->bufcnt; in aspeed_ahash_hmac_resume()
448 hash_engine->src_length = rctx->bufcnt; in aspeed_ahash_req_final()
475 if (rctx->bufcnt != 0) in aspeed_ahash_update_resume_sg()
486 rctx->bufcnt = rctx->total - rctx->offset; in aspeed_ahash_update_resume_sg()
607 if (rctx->bufcnt + rctx->total < rctx->block_size) { in aspeed_sham_update()
608 scatterwalk_map_and_copy(rctx->buffer + rctx->bufcnt, in aspeed_sham_update()
611 rctx->bufcnt += rctx->total; in aspeed_sham_update()
737 rctx->bufcnt = 0; in aspeed_sham_init()
745 rctx->bufcnt = rctx->block_size; in aspeed_sham_init()
793 rctx->bufcnt = 0; in aspeed_sha512s_init()
801 rctx->bufcnt = rctx->block_size; in aspeed_sha512s_init()