Lines Matching defs:bctx
353 struct aspeed_sha_hmac_ctx *bctx = tctx->base;
365 memcpy(rctx->buffer, bctx->opad, rctx->block_size);
667 struct aspeed_sha_hmac_ctx *bctx = tctx->base;
739 memcpy(rctx->buffer, bctx->ipad, rctx->block_size);
756 struct aspeed_sha_hmac_ctx *bctx = tctx->base;
757 int ds = crypto_shash_digestsize(bctx->shash);
758 int bs = crypto_shash_blocksize(bctx->shash);
766 err = aspeed_sham_shash_digest(bctx->shash,
767 crypto_shash_get_flags(bctx->shash),
768 key, keylen, bctx->ipad);
774 memcpy(bctx->ipad, key, keylen);
777 memset(bctx->ipad + keylen, 0, bs - keylen);
778 memcpy(bctx->opad, bctx->ipad, bs);
781 bctx->ipad[i] ^= HMAC_IPAD_VALUE;
782 bctx->opad[i] ^= HMAC_OPAD_VALUE;
803 struct aspeed_sha_hmac_ctx *bctx = tctx->base;
806 bctx->shash = crypto_alloc_shash(ast_alg->alg_base, 0,
808 if (IS_ERR(bctx->shash)) {
812 return PTR_ERR(bctx->shash);
827 struct aspeed_sha_hmac_ctx *bctx = tctx->base;
829 crypto_free_shash(bctx->shash);