prng.h 718 B

123456789101112131415161718192021222324252627
  1. /*
  2. * PRNG: Pseudo Random Number Generator
  3. *
  4. * (C) 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
  8. * Free Software Foundation; either version 2 of the License, or (at your
  9. * any later version.
  10. *
  11. *
  12. */
  13. #ifndef _PRNG_H_
  14. #define _PRNG_H_
  15. struct prng_context;
  16. int get_prng_bytes(char *buf, int nbytes, struct prng_context *ctx);
  17. struct prng_context *alloc_prng_context(void);
  18. int reset_prng_context(struct prng_context *ctx,
  19. unsigned char *key, unsigned char *iv,
  20. unsigned char *V,
  21. unsigned char *DT);
  22. void free_prng_context(struct prng_context *ctx);
  23. #endif