Lines Matching defs:tfm

137 static int ahash_setkey_unaligned(struct crypto_ahash *tfm, const u8 *key,
140 unsigned long alignmask = crypto_ahash_alignmask(tfm);
152 ret = tfm->setkey(tfm, alignbuffer, keylen);
157 static int ahash_nosetkey(struct crypto_ahash *tfm, const u8 *key,
163 static void ahash_set_needkey(struct crypto_ahash *tfm)
165 const struct hash_alg_common *alg = crypto_hash_alg_common(tfm);
167 if (tfm->setkey != ahash_nosetkey &&
169 crypto_ahash_set_flags(tfm, CRYPTO_TFM_NEED_KEY);
172 int crypto_ahash_setkey(struct crypto_ahash *tfm, const u8 *key,
175 unsigned long alignmask = crypto_ahash_alignmask(tfm);
179 err = ahash_setkey_unaligned(tfm, key, keylen);
181 err = tfm->setkey(tfm, key, keylen);
184 ahash_set_needkey(tfm);
188 crypto_ahash_clear_flags(tfm, CRYPTO_TFM_NEED_KEY);
201 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
202 unsigned long alignmask = crypto_ahash_alignmask(tfm);
203 unsigned int ds = crypto_ahash_digestsize(tfm);
331 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
332 unsigned long alignmask = crypto_ahash_alignmask(tfm);
342 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
343 struct crypto_alg *alg = tfm->base.__crt_alg;
356 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
357 struct crypto_alg *alg = tfm->base.__crt_alg;
370 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
371 struct crypto_alg *alg = tfm->base.__crt_alg;
376 if (crypto_ahash_get_flags(tfm) & CRYPTO_TFM_NEED_KEY)
379 ret = crypto_ahash_op(req, tfm->digest);
433 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
440 err = tfm->update(req);
447 static void crypto_ahash_exit_tfm(struct crypto_tfm *tfm)
449 struct crypto_ahash *hash = __crypto_ahash_cast(tfm);
455 static int crypto_ahash_init_tfm(struct crypto_tfm *tfm)
457 struct crypto_ahash *hash = __crypto_ahash_cast(tfm);
462 if (tfm->__crt_alg->cra_type != &crypto_ahash_type)
463 return crypto_init_shash_ops_async(tfm);
479 tfm->exit = crypto_ahash_exit_tfm;