Lines Matching refs:base_hash

286 	struct crypto_shash *base_hash = ERR_PTR(-EINVAL);  in chcr_alloc_shash()  local
290 base_hash = crypto_alloc_shash("sha1", 0, 0); in chcr_alloc_shash()
293 base_hash = crypto_alloc_shash("sha224", 0, 0); in chcr_alloc_shash()
296 base_hash = crypto_alloc_shash("sha256", 0, 0); in chcr_alloc_shash()
299 base_hash = crypto_alloc_shash("sha384", 0, 0); in chcr_alloc_shash()
302 base_hash = crypto_alloc_shash("sha512", 0, 0); in chcr_alloc_shash()
306 return base_hash; in chcr_alloc_shash()
1557 static inline void chcr_free_shash(struct crypto_shash *base_hash) in chcr_free_shash() argument
1559 crypto_free_shash(base_hash); in chcr_free_shash()
2208 SHASH_DESC_ON_STACK(shash, hmacctx->base_hash); in chcr_ahash_setkey()
2214 shash->tfm = hmacctx->base_hash; in chcr_ahash_setkey()
2352 hmacctx->base_hash = chcr_alloc_shash(digestsize); in chcr_hmac_cra_init()
2353 if (IS_ERR(hmacctx->base_hash)) in chcr_hmac_cra_init()
2354 return PTR_ERR(hmacctx->base_hash); in chcr_hmac_cra_init()
2363 if (hmacctx->base_hash) { in chcr_hmac_cra_exit()
2364 chcr_free_shash(hmacctx->base_hash); in chcr_hmac_cra_exit()
2365 hmacctx->base_hash = NULL; in chcr_hmac_cra_exit()
3562 struct crypto_shash *base_hash = ERR_PTR(-EINVAL); in chcr_authenc_setkey() local
3613 base_hash = chcr_alloc_shash(max_authsize); in chcr_authenc_setkey()
3614 if (IS_ERR(base_hash)) { in chcr_authenc_setkey()
3619 SHASH_DESC_ON_STACK(shash, base_hash); in chcr_authenc_setkey()
3621 shash->tfm = base_hash; in chcr_authenc_setkey()
3622 bs = crypto_shash_blocksize(base_hash); in chcr_authenc_setkey()
3665 chcr_free_shash(base_hash); in chcr_authenc_setkey()
3673 if (!IS_ERR(base_hash)) in chcr_authenc_setkey()
3674 chcr_free_shash(base_hash); in chcr_authenc_setkey()