Lines Matching refs:base_hash
282 struct crypto_shash *base_hash = ERR_PTR(-EINVAL); in chcr_alloc_shash() local
286 base_hash = crypto_alloc_shash("sha1", 0, 0); in chcr_alloc_shash()
289 base_hash = crypto_alloc_shash("sha224", 0, 0); in chcr_alloc_shash()
292 base_hash = crypto_alloc_shash("sha256", 0, 0); in chcr_alloc_shash()
295 base_hash = crypto_alloc_shash("sha384", 0, 0); in chcr_alloc_shash()
298 base_hash = crypto_alloc_shash("sha512", 0, 0); in chcr_alloc_shash()
302 return base_hash; in chcr_alloc_shash()
1550 static inline void chcr_free_shash(struct crypto_shash *base_hash) in chcr_free_shash() argument
1552 crypto_free_shash(base_hash); in chcr_free_shash()
2202 SHASH_DESC_ON_STACK(shash, hmacctx->base_hash); in chcr_ahash_setkey()
2208 shash->tfm = hmacctx->base_hash; in chcr_ahash_setkey()
2346 hmacctx->base_hash = chcr_alloc_shash(digestsize); in chcr_hmac_cra_init()
2347 if (IS_ERR(hmacctx->base_hash)) in chcr_hmac_cra_init()
2348 return PTR_ERR(hmacctx->base_hash); in chcr_hmac_cra_init()
2357 if (hmacctx->base_hash) { in chcr_hmac_cra_exit()
2358 chcr_free_shash(hmacctx->base_hash); in chcr_hmac_cra_exit()
2359 hmacctx->base_hash = NULL; in chcr_hmac_cra_exit()
3556 struct crypto_shash *base_hash = ERR_PTR(-EINVAL); in chcr_authenc_setkey() local
3607 base_hash = chcr_alloc_shash(max_authsize); in chcr_authenc_setkey()
3608 if (IS_ERR(base_hash)) { in chcr_authenc_setkey()
3613 SHASH_DESC_ON_STACK(shash, base_hash); in chcr_authenc_setkey()
3615 shash->tfm = base_hash; in chcr_authenc_setkey()
3616 bs = crypto_shash_blocksize(base_hash); in chcr_authenc_setkey()
3659 chcr_free_shash(base_hash); in chcr_authenc_setkey()
3667 if (!IS_ERR(base_hash)) in chcr_authenc_setkey()
3668 chcr_free_shash(base_hash); in chcr_authenc_setkey()