random_provider.h 463 B

1234567891011121314
  1. #pragma once
  2. #include <util/generic/guid.h>
  3. #include <util/random/common_ops.h>
  4. class IRandomProvider: public TThrRefBase, public TCommonRNG<ui64, IRandomProvider> {
  5. public:
  6. virtual TGUID GenGuid() noexcept = 0;
  7. virtual TGUID GenUuid4() noexcept = 0;
  8. virtual ui64 GenRand() noexcept = 0; // for TCommonRNG
  9. };
  10. TIntrusivePtr<IRandomProvider> CreateDefaultRandomProvider();
  11. TIntrusivePtr<IRandomProvider> CreateDeterministicRandomProvider(ui64 seed);