Lines Matching refs:hash
5 * This is the asynchronous version of hash.c with notification of
22 #include "hash.h"
416 struct crypto_ahash *hash = __crypto_ahash_cast(tfm);
417 struct ahash_alg *alg = crypto_ahash_alg(hash);
419 alg->exit_tfm(hash);
424 struct crypto_ahash *hash = __crypto_ahash_cast(tfm);
425 struct ahash_alg *alg = crypto_ahash_alg(hash);
427 hash->setkey = ahash_nosetkey;
429 crypto_ahash_set_statesize(hash, alg->halg.statesize);
434 hash->init = alg->init;
435 hash->update = alg->update;
436 hash->final = alg->final;
437 hash->finup = alg->finup ?: ahash_def_finup;
438 hash->digest = alg->digest;
439 hash->export = alg->export;
440 hash->import = alg->import;
443 hash->setkey = alg->setkey;
444 ahash_set_needkey(hash);
450 return alg->init_tfm ? alg->init_tfm(hash) : 0;
542 struct crypto_ahash *crypto_clone_ahash(struct crypto_ahash *hash)
544 struct hash_alg_common *halg = crypto_hash_alg_common(hash);
545 struct crypto_tfm *tfm = crypto_ahash_tfm(hash);
555 return hash;
563 nhash->init = hash->init;
564 nhash->update = hash->update;
565 nhash->final = hash->final;
566 nhash->finup = hash->finup;
567 nhash->digest = hash->digest;
568 nhash->export = hash->export;
569 nhash->import = hash->import;
570 nhash->setkey = hash->setkey;
571 nhash->reqsize = hash->reqsize;
572 nhash->statesize = hash->statesize;
575 return crypto_clone_shash_ops_async(nhash, hash);
578 alg = crypto_ahash_alg(hash);
582 err = alg->clone_tfm(nhash, hash);
688 MODULE_DESCRIPTION("Asynchronous cryptographic hash type");