Lines Matching refs:tfm
42 int (*generate)(struct crypto_rng *tfm,
45 int (*seed)(struct crypto_rng *tfm, const u8 *seed, unsigned int slen);
46 void (*set_ent)(struct crypto_rng *tfm, const u8 *data,
92 static inline struct crypto_tfm *crypto_rng_tfm(struct crypto_rng *tfm) in crypto_rng_tfm() argument
94 return &tfm->base; in crypto_rng_tfm()
105 static inline struct rng_alg *crypto_rng_alg(struct crypto_rng *tfm) in crypto_rng_alg() argument
107 return container_of(crypto_rng_tfm(tfm)->__crt_alg, in crypto_rng_alg()
117 static inline void crypto_free_rng(struct crypto_rng *tfm) in crypto_free_rng() argument
119 crypto_destroy_tfm(tfm, crypto_rng_tfm(tfm)); in crypto_free_rng()
136 static inline int crypto_rng_generate(struct crypto_rng *tfm, in crypto_rng_generate() argument
140 struct crypto_alg *alg = tfm->base.__crt_alg; in crypto_rng_generate()
144 ret = crypto_rng_alg(tfm)->generate(tfm, src, slen, dst, dlen); in crypto_rng_generate()
160 static inline int crypto_rng_get_bytes(struct crypto_rng *tfm, in crypto_rng_get_bytes() argument
163 return crypto_rng_generate(tfm, NULL, 0, rdata, dlen); in crypto_rng_get_bytes()
183 int crypto_rng_reset(struct crypto_rng *tfm, const u8 *seed,
198 static inline int crypto_rng_seedsize(struct crypto_rng *tfm) in crypto_rng_seedsize() argument
200 return crypto_rng_alg(tfm)->seedsize; in crypto_rng_seedsize()