Random.hx 605 B

1234567891011121314151617181920212223242526
  1. package eval.luv;
  2. @:forward
  3. abstract RandomRequest(Request) to Request {}
  4. /**
  5. System entropy source.
  6. @see https://aantron.github.io/luv/luv/Luv/Random
  7. **/
  8. extern class Random {
  9. static function createRequest():RandomRequest;
  10. /**
  11. Fills the given buffer with bits from the system entropy source.
  12. **/
  13. static function random(loop:Loop, buffer:Buffer, ?request:RandomRequest, callback:(result:Result<Result.NoData>)->Void):Void;
  14. }
  15. extern class RandomSync {
  16. /**
  17. Fills the given buffer with bits from the system entropy source.
  18. **/
  19. static function random(buffer:Buffer):Result<Result.NoData>;
  20. }