Lines Matching refs:tfm

136 	int (*setkey)(struct crypto_ahash *tfm, const u8 *key,
143 struct crypto_shash *tfm; member
182 int (*setkey)(struct crypto_shash *tfm, const u8 *key,
203 int (*setkey)(struct crypto_ahash *tfm, const u8 *key,
226 static inline struct crypto_ahash *__crypto_ahash_cast(struct crypto_tfm *tfm) in __crypto_ahash_cast() argument
228 return container_of(tfm, struct crypto_ahash, base); in __crypto_ahash_cast()
248 static inline struct crypto_tfm *crypto_ahash_tfm(struct crypto_ahash *tfm) in crypto_ahash_tfm() argument
250 return &tfm->base; in crypto_ahash_tfm()
257 static inline void crypto_free_ahash(struct crypto_ahash *tfm) in crypto_free_ahash() argument
259 crypto_destroy_tfm(tfm, crypto_ahash_tfm(tfm)); in crypto_free_ahash()
263 struct crypto_ahash *tfm) in crypto_ahash_alignmask() argument
265 return crypto_tfm_alg_alignmask(crypto_ahash_tfm(tfm)); in crypto_ahash_alignmask()
277 static inline unsigned int crypto_ahash_blocksize(struct crypto_ahash *tfm) in crypto_ahash_blocksize() argument
279 return crypto_tfm_alg_blocksize(crypto_ahash_tfm(tfm)); in crypto_ahash_blocksize()
289 struct crypto_ahash *tfm) in crypto_hash_alg_common() argument
291 return __crypto_hash_alg_common(crypto_ahash_tfm(tfm)->__crt_alg); in crypto_hash_alg_common()
304 static inline unsigned int crypto_ahash_digestsize(struct crypto_ahash *tfm) in crypto_ahash_digestsize() argument
306 return crypto_hash_alg_common(tfm)->digestsize; in crypto_ahash_digestsize()
309 static inline unsigned int crypto_ahash_statesize(struct crypto_ahash *tfm) in crypto_ahash_statesize() argument
311 return crypto_hash_alg_common(tfm)->statesize; in crypto_ahash_statesize()
314 static inline u32 crypto_ahash_get_flags(struct crypto_ahash *tfm) in crypto_ahash_get_flags() argument
316 return crypto_tfm_get_flags(crypto_ahash_tfm(tfm)); in crypto_ahash_get_flags()
319 static inline void crypto_ahash_set_flags(struct crypto_ahash *tfm, u32 flags) in crypto_ahash_set_flags() argument
321 crypto_tfm_set_flags(crypto_ahash_tfm(tfm), flags); in crypto_ahash_set_flags()
324 static inline void crypto_ahash_clear_flags(struct crypto_ahash *tfm, u32 flags) in crypto_ahash_clear_flags() argument
326 crypto_tfm_clear_flags(crypto_ahash_tfm(tfm), flags); in crypto_ahash_clear_flags()
342 return __crypto_ahash_cast(req->base.tfm); in crypto_ahash_reqtfm()
355 static inline unsigned int crypto_ahash_reqsize(struct crypto_ahash *tfm) in crypto_ahash_reqsize() argument
357 return tfm->reqsize; in crypto_ahash_reqsize()
376 int crypto_ahash_setkey(struct crypto_ahash *tfm, const u8 *key,
379 static inline bool crypto_ahash_has_setkey(struct crypto_ahash *tfm) in crypto_ahash_has_setkey() argument
381 return tfm->has_setkey; in crypto_ahash_has_setkey()
512 struct crypto_ahash *tfm) in ahash_request_set_tfm() argument
514 req->base.tfm = crypto_ahash_tfm(tfm); in ahash_request_set_tfm()
531 struct crypto_ahash *tfm, gfp_t gfp) in ahash_request_alloc() argument
536 crypto_ahash_reqsize(tfm), gfp); in ahash_request_alloc()
539 ahash_request_set_tfm(req, tfm); in ahash_request_alloc()
646 static inline struct crypto_tfm *crypto_shash_tfm(struct crypto_shash *tfm) in crypto_shash_tfm() argument
648 return &tfm->base; in crypto_shash_tfm()
655 static inline void crypto_free_shash(struct crypto_shash *tfm) in crypto_free_shash() argument
657 crypto_destroy_tfm(tfm, crypto_shash_tfm(tfm)); in crypto_free_shash()
661 struct crypto_shash *tfm) in crypto_shash_alignmask() argument
663 return crypto_tfm_alg_alignmask(crypto_shash_tfm(tfm)); in crypto_shash_alignmask()
675 static inline unsigned int crypto_shash_blocksize(struct crypto_shash *tfm) in crypto_shash_blocksize() argument
677 return crypto_tfm_alg_blocksize(crypto_shash_tfm(tfm)); in crypto_shash_blocksize()
685 static inline struct shash_alg *crypto_shash_alg(struct crypto_shash *tfm) in crypto_shash_alg() argument
687 return __crypto_shash_alg(crypto_shash_tfm(tfm)->__crt_alg); in crypto_shash_alg()
699 static inline unsigned int crypto_shash_digestsize(struct crypto_shash *tfm) in crypto_shash_digestsize() argument
701 return crypto_shash_alg(tfm)->digestsize; in crypto_shash_digestsize()
704 static inline unsigned int crypto_shash_statesize(struct crypto_shash *tfm) in crypto_shash_statesize() argument
706 return crypto_shash_alg(tfm)->statesize; in crypto_shash_statesize()
709 static inline u32 crypto_shash_get_flags(struct crypto_shash *tfm) in crypto_shash_get_flags() argument
711 return crypto_tfm_get_flags(crypto_shash_tfm(tfm)); in crypto_shash_get_flags()
714 static inline void crypto_shash_set_flags(struct crypto_shash *tfm, u32 flags) in crypto_shash_set_flags() argument
716 crypto_tfm_set_flags(crypto_shash_tfm(tfm), flags); in crypto_shash_set_flags()
719 static inline void crypto_shash_clear_flags(struct crypto_shash *tfm, u32 flags) in crypto_shash_clear_flags() argument
721 crypto_tfm_clear_flags(crypto_shash_tfm(tfm), flags); in crypto_shash_clear_flags()
739 static inline unsigned int crypto_shash_descsize(struct crypto_shash *tfm) in crypto_shash_descsize() argument
741 return tfm->descsize; in crypto_shash_descsize()
761 int crypto_shash_setkey(struct crypto_shash *tfm, const u8 *key,
794 return crypto_shash_alg(desc->tfm)->export(desc, out); in crypto_shash_export()
810 return crypto_shash_alg(desc->tfm)->import(desc, in); in crypto_shash_import()
826 return crypto_shash_alg(desc->tfm)->init(desc); in crypto_shash_init()