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()
2347 hmacctx->base_hash = chcr_alloc_shash(digestsize); in chcr_hmac_cra_init()
2348 if (IS_ERR(hmacctx->base_hash)) in chcr_hmac_cra_init()
2349 return PTR_ERR(hmacctx->base_hash); in chcr_hmac_cra_init()
2358 if (hmacctx->base_hash) { in chcr_hmac_cra_exit()
2359 chcr_free_shash(hmacctx->base_hash); in chcr_hmac_cra_exit()
2360 hmacctx->base_hash = NULL; in chcr_hmac_cra_exit()
3558 struct crypto_shash *base_hash = ERR_PTR(-EINVAL); in chcr_authenc_setkey() local
3609 base_hash = chcr_alloc_shash(max_authsize); in chcr_authenc_setkey()
3610 if (IS_ERR(base_hash)) { in chcr_authenc_setkey()
3615 SHASH_DESC_ON_STACK(shash, base_hash); in chcr_authenc_setkey()
3617 shash->tfm = base_hash; in chcr_authenc_setkey()
3618 bs = crypto_shash_blocksize(base_hash); in chcr_authenc_setkey()
3661 chcr_free_shash(base_hash); in chcr_authenc_setkey()
3669 if (!IS_ERR(base_hash)) in chcr_authenc_setkey()
3670 chcr_free_shash(base_hash); in chcr_authenc_setkey()