28 static inline struct crypto_rng *crypto_alloc_rng(
const char *alg_name,
45 return &crypto_rng_tfm(tfm)->__crt_alg->cra_rng;
50 return &crypto_rng_tfm(tfm)->crt_rng;
53 static inline void crypto_free_rng(
struct crypto_rng *tfm)
58 static inline int crypto_rng_get_bytes(
struct crypto_rng *tfm,
59 u8 *rdata,
unsigned int dlen)
61 return crypto_rng_crt(tfm)->rng_gen_random(tfm, rdata, dlen);
64 static inline int crypto_rng_reset(
struct crypto_rng *tfm,
65 u8 *seed,
unsigned int slen)
67 return crypto_rng_crt(tfm)->rng_reset(tfm, seed, slen);
70 static inline int crypto_rng_seedsize(
struct crypto_rng *tfm)
72 return crypto_rng_alg(tfm)->seedsize;