Lines Matching refs:tfm
131 int (*setkey)(struct crypto_ahash *tfm, const u8 *key,
138 struct crypto_shash *tfm; member
177 int (*setkey)(struct crypto_shash *tfm, const u8 *key,
198 int (*setkey)(struct crypto_ahash *tfm, const u8 *key,
221 static inline struct crypto_ahash *__crypto_ahash_cast(struct crypto_tfm *tfm) in __crypto_ahash_cast() argument
223 return container_of(tfm, struct crypto_ahash, base); in __crypto_ahash_cast()
243 static inline struct crypto_tfm *crypto_ahash_tfm(struct crypto_ahash *tfm) in crypto_ahash_tfm() argument
245 return &tfm->base; in crypto_ahash_tfm()
252 static inline void crypto_free_ahash(struct crypto_ahash *tfm) in crypto_free_ahash() argument
254 crypto_destroy_tfm(tfm, crypto_ahash_tfm(tfm)); in crypto_free_ahash()
258 struct crypto_ahash *tfm) in crypto_ahash_alignmask() argument
260 return crypto_tfm_alg_alignmask(crypto_ahash_tfm(tfm)); in crypto_ahash_alignmask()
270 struct crypto_ahash *tfm) in crypto_hash_alg_common() argument
272 return __crypto_hash_alg_common(crypto_ahash_tfm(tfm)->__crt_alg); in crypto_hash_alg_common()
285 static inline unsigned int crypto_ahash_digestsize(struct crypto_ahash *tfm) in crypto_ahash_digestsize() argument
287 return crypto_hash_alg_common(tfm)->digestsize; in crypto_ahash_digestsize()
290 static inline unsigned int crypto_ahash_statesize(struct crypto_ahash *tfm) in crypto_ahash_statesize() argument
292 return crypto_hash_alg_common(tfm)->statesize; in crypto_ahash_statesize()
295 static inline u32 crypto_ahash_get_flags(struct crypto_ahash *tfm) in crypto_ahash_get_flags() argument
297 return crypto_tfm_get_flags(crypto_ahash_tfm(tfm)); in crypto_ahash_get_flags()
300 static inline void crypto_ahash_set_flags(struct crypto_ahash *tfm, u32 flags) in crypto_ahash_set_flags() argument
302 crypto_tfm_set_flags(crypto_ahash_tfm(tfm), flags); in crypto_ahash_set_flags()
305 static inline void crypto_ahash_clear_flags(struct crypto_ahash *tfm, u32 flags) in crypto_ahash_clear_flags() argument
307 crypto_tfm_clear_flags(crypto_ahash_tfm(tfm), flags); in crypto_ahash_clear_flags()
323 return __crypto_ahash_cast(req->base.tfm); in crypto_ahash_reqtfm()
336 static inline unsigned int crypto_ahash_reqsize(struct crypto_ahash *tfm) in crypto_ahash_reqsize() argument
338 return tfm->reqsize; in crypto_ahash_reqsize()
357 int crypto_ahash_setkey(struct crypto_ahash *tfm, const u8 *key,
360 static inline bool crypto_ahash_has_setkey(struct crypto_ahash *tfm) in crypto_ahash_has_setkey() argument
362 return tfm->has_setkey; in crypto_ahash_has_setkey()
493 struct crypto_ahash *tfm) in ahash_request_set_tfm() argument
495 req->base.tfm = crypto_ahash_tfm(tfm); in ahash_request_set_tfm()
512 struct crypto_ahash *tfm, gfp_t gfp) in ahash_request_alloc() argument
517 crypto_ahash_reqsize(tfm), gfp); in ahash_request_alloc()
520 ahash_request_set_tfm(req, tfm); in ahash_request_alloc()
627 static inline struct crypto_tfm *crypto_shash_tfm(struct crypto_shash *tfm) in crypto_shash_tfm() argument
629 return &tfm->base; in crypto_shash_tfm()
636 static inline void crypto_free_shash(struct crypto_shash *tfm) in crypto_free_shash() argument
638 crypto_destroy_tfm(tfm, crypto_shash_tfm(tfm)); in crypto_free_shash()
642 struct crypto_shash *tfm) in crypto_shash_alignmask() argument
644 return crypto_tfm_alg_alignmask(crypto_shash_tfm(tfm)); in crypto_shash_alignmask()
656 static inline unsigned int crypto_shash_blocksize(struct crypto_shash *tfm) in crypto_shash_blocksize() argument
658 return crypto_tfm_alg_blocksize(crypto_shash_tfm(tfm)); in crypto_shash_blocksize()
666 static inline struct shash_alg *crypto_shash_alg(struct crypto_shash *tfm) in crypto_shash_alg() argument
668 return __crypto_shash_alg(crypto_shash_tfm(tfm)->__crt_alg); in crypto_shash_alg()
680 static inline unsigned int crypto_shash_digestsize(struct crypto_shash *tfm) in crypto_shash_digestsize() argument
682 return crypto_shash_alg(tfm)->digestsize; in crypto_shash_digestsize()
685 static inline unsigned int crypto_shash_statesize(struct crypto_shash *tfm) in crypto_shash_statesize() argument
687 return crypto_shash_alg(tfm)->statesize; in crypto_shash_statesize()
690 static inline u32 crypto_shash_get_flags(struct crypto_shash *tfm) in crypto_shash_get_flags() argument
692 return crypto_tfm_get_flags(crypto_shash_tfm(tfm)); in crypto_shash_get_flags()
695 static inline void crypto_shash_set_flags(struct crypto_shash *tfm, u32 flags) in crypto_shash_set_flags() argument
697 crypto_tfm_set_flags(crypto_shash_tfm(tfm), flags); in crypto_shash_set_flags()
700 static inline void crypto_shash_clear_flags(struct crypto_shash *tfm, u32 flags) in crypto_shash_clear_flags() argument
702 crypto_tfm_clear_flags(crypto_shash_tfm(tfm), flags); in crypto_shash_clear_flags()
720 static inline unsigned int crypto_shash_descsize(struct crypto_shash *tfm) in crypto_shash_descsize() argument
722 return tfm->descsize; in crypto_shash_descsize()
742 int crypto_shash_setkey(struct crypto_shash *tfm, const u8 *key,
775 return crypto_shash_alg(desc->tfm)->export(desc, out); in crypto_shash_export()
791 return crypto_shash_alg(desc->tfm)->import(desc, in); in crypto_shash_import()
807 return crypto_shash_alg(desc->tfm)->init(desc); in crypto_shash_init()