Lines Matching refs:hash

416 	struct crypto_ahash *hash = __crypto_ahash_cast(tfm);  in crypto_ahash_exit_tfm()  local
417 struct ahash_alg *alg = crypto_ahash_alg(hash); in crypto_ahash_exit_tfm()
419 alg->exit_tfm(hash); in crypto_ahash_exit_tfm()
424 struct crypto_ahash *hash = __crypto_ahash_cast(tfm); in crypto_ahash_init_tfm() local
425 struct ahash_alg *alg = crypto_ahash_alg(hash); in crypto_ahash_init_tfm()
427 hash->setkey = ahash_nosetkey; in crypto_ahash_init_tfm()
429 crypto_ahash_set_statesize(hash, alg->halg.statesize); in crypto_ahash_init_tfm()
434 hash->init = alg->init; in crypto_ahash_init_tfm()
435 hash->update = alg->update; in crypto_ahash_init_tfm()
436 hash->final = alg->final; in crypto_ahash_init_tfm()
437 hash->finup = alg->finup ?: ahash_def_finup; in crypto_ahash_init_tfm()
438 hash->digest = alg->digest; in crypto_ahash_init_tfm()
439 hash->export = alg->export; in crypto_ahash_init_tfm()
440 hash->import = alg->import; in crypto_ahash_init_tfm()
443 hash->setkey = alg->setkey; in crypto_ahash_init_tfm()
444 ahash_set_needkey(hash); in crypto_ahash_init_tfm()
450 return alg->init_tfm ? alg->init_tfm(hash) : 0; in crypto_ahash_init_tfm()
542 struct crypto_ahash *crypto_clone_ahash(struct crypto_ahash *hash) in crypto_clone_ahash() argument
544 struct hash_alg_common *halg = crypto_hash_alg_common(hash); in crypto_clone_ahash()
545 struct crypto_tfm *tfm = crypto_ahash_tfm(hash); in crypto_clone_ahash()
555 return hash; in crypto_clone_ahash()
563 nhash->init = hash->init; in crypto_clone_ahash()
564 nhash->update = hash->update; in crypto_clone_ahash()
565 nhash->final = hash->final; in crypto_clone_ahash()
566 nhash->finup = hash->finup; in crypto_clone_ahash()
567 nhash->digest = hash->digest; in crypto_clone_ahash()
568 nhash->export = hash->export; in crypto_clone_ahash()
569 nhash->import = hash->import; in crypto_clone_ahash()
570 nhash->setkey = hash->setkey; in crypto_clone_ahash()
571 nhash->reqsize = hash->reqsize; in crypto_clone_ahash()
572 nhash->statesize = hash->statesize; in crypto_clone_ahash()
575 return crypto_clone_shash_ops_async(nhash, hash); in crypto_clone_ahash()
578 alg = crypto_ahash_alg(hash); in crypto_clone_ahash()
582 err = alg->clone_tfm(nhash, hash); in crypto_clone_ahash()