Lines Matching refs:tfm
183 struct crypto_tfm *tfm; member
245 int (*cia_setkey)(struct crypto_tfm *tfm, const u8 *key,
247 void (*cia_encrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
248 void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
263 int (*coa_compress)(struct crypto_tfm *tfm, const u8 *src,
265 int (*coa_decompress)(struct crypto_tfm *tfm, const u8 *src,
491 int (*cra_init)(struct crypto_tfm *tfm);
492 void (*cra_exit)(struct crypto_tfm *tfm);
635 void (*exit)(struct crypto_tfm *tfm);
677 void crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm);
679 static inline void crypto_free_tfm(struct crypto_tfm *tfm) in crypto_free_tfm() argument
681 return crypto_destroy_tfm(tfm, tfm); in crypto_free_tfm()
689 static inline const char *crypto_tfm_alg_name(struct crypto_tfm *tfm) in crypto_tfm_alg_name() argument
691 return tfm->__crt_alg->cra_name; in crypto_tfm_alg_name()
694 static inline const char *crypto_tfm_alg_driver_name(struct crypto_tfm *tfm) in crypto_tfm_alg_driver_name() argument
696 return tfm->__crt_alg->cra_driver_name; in crypto_tfm_alg_driver_name()
699 static inline int crypto_tfm_alg_priority(struct crypto_tfm *tfm) in crypto_tfm_alg_priority() argument
701 return tfm->__crt_alg->cra_priority; in crypto_tfm_alg_priority()
704 static inline u32 crypto_tfm_alg_type(struct crypto_tfm *tfm) in crypto_tfm_alg_type() argument
706 return tfm->__crt_alg->cra_flags & CRYPTO_ALG_TYPE_MASK; in crypto_tfm_alg_type()
709 static inline unsigned int crypto_tfm_alg_blocksize(struct crypto_tfm *tfm) in crypto_tfm_alg_blocksize() argument
711 return tfm->__crt_alg->cra_blocksize; in crypto_tfm_alg_blocksize()
714 static inline unsigned int crypto_tfm_alg_alignmask(struct crypto_tfm *tfm) in crypto_tfm_alg_alignmask() argument
716 return tfm->__crt_alg->cra_alignmask; in crypto_tfm_alg_alignmask()
719 static inline u32 crypto_tfm_get_flags(struct crypto_tfm *tfm) in crypto_tfm_get_flags() argument
721 return tfm->crt_flags; in crypto_tfm_get_flags()
724 static inline void crypto_tfm_set_flags(struct crypto_tfm *tfm, u32 flags) in crypto_tfm_set_flags() argument
726 tfm->crt_flags |= flags; in crypto_tfm_set_flags()
729 static inline void crypto_tfm_clear_flags(struct crypto_tfm *tfm, u32 flags) in crypto_tfm_clear_flags() argument
731 tfm->crt_flags &= ~flags; in crypto_tfm_clear_flags()
734 static inline void *crypto_tfm_ctx(struct crypto_tfm *tfm) in crypto_tfm_ctx() argument
736 return tfm->__crt_ctx; in crypto_tfm_ctx()
741 struct crypto_tfm *tfm; in crypto_tfm_ctx_alignment() local
742 return __alignof__(tfm->__crt_ctx); in crypto_tfm_ctx_alignment()
745 static inline struct crypto_comp *__crypto_comp_cast(struct crypto_tfm *tfm) in __crypto_comp_cast() argument
747 return (struct crypto_comp *)tfm; in __crypto_comp_cast()
760 static inline struct crypto_tfm *crypto_comp_tfm(struct crypto_comp *tfm) in crypto_comp_tfm() argument
762 return &tfm->base; in crypto_comp_tfm()
765 static inline void crypto_free_comp(struct crypto_comp *tfm) in crypto_free_comp() argument
767 crypto_free_tfm(crypto_comp_tfm(tfm)); in crypto_free_comp()
779 static inline const char *crypto_comp_name(struct crypto_comp *tfm) in crypto_comp_name() argument
781 return crypto_tfm_alg_name(crypto_comp_tfm(tfm)); in crypto_comp_name()
784 int crypto_comp_compress(struct crypto_comp *tfm,
788 int crypto_comp_decompress(struct crypto_comp *tfm,