entropy.h 447 B

123456789101112131415161718192021
  1. #pragma once
  2. class TBuffer;
  3. class IInputStream;
  4. /*
  5. * fast entropy pool, based on good prng, can lock for some time
  6. * initialized with some bits from system entropy pool
  7. * think as /dev/urandom replacement
  8. */
  9. IInputStream& EntropyPool();
  10. /*
  11. * fast(non-blocking) entropy pool, useful for seeding PRNGs
  12. */
  13. IInputStream& Seed();
  14. /*
  15. * Re-initialize entropy pool - useful after forking in multi-process programs.
  16. */
  17. void ResetEntropyPool();