rng.h 760 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * RNG: Random Number Generator algorithms under the crypto API
  3. *
  4. * Copyright (c) 2008 Neil Horman <nhorman@tuxdriver.com>
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License as published by the Free
  8. * Software Foundation; either version 2 of the License, or (at your option)
  9. * any later version.
  10. *
  11. */
  12. #ifndef _CRYPTO_INTERNAL_RNG_H
  13. #define _CRYPTO_INTERNAL_RNG_H
  14. #include <crypto/algapi.h>
  15. #include <crypto/rng.h>
  16. extern const struct crypto_type crypto_rng_type;
  17. int crypto_register_rng(struct rng_alg *alg);
  18. void crypto_unregister_rng(struct rng_alg *alg);
  19. static inline void *crypto_rng_ctx(struct crypto_rng *tfm)
  20. {
  21. return crypto_tfm_ctx(&tfm->base);
  22. }
  23. #endif