Léo Lam fff1db9730 Common: Add Random utilities
This makes it easier to generate random numbers or fill a buffer with
random data in a cryptographically secure way.

This also replaces existing usages of RNG functions in the codebase:

* <random> is pretty hard to use correctly, and std::random_device does
  not give enough guarantees about its results (it's
  implementation-defined, non cryptographically secure and could be
  deterministic on some platforms).
  Doing things correctly is error prone and verbose.

* rand() is terrible and should not be used especially in crypto code.
2018-05-31 17:54:43 +02:00
..
2018-05-31 17:54:43 +02:00
2016-12-06 20:33:53 +01:00
2018-04-12 21:28:39 +02:00
2018-04-12 21:28:39 +02:00
2018-04-12 21:28:39 +02:00
2018-05-27 18:48:09 -04:00
2018-03-14 22:03:12 -04:00
2018-05-31 17:54:43 +02:00
2018-05-31 17:54:43 +02:00
2018-04-12 21:28:39 +02:00
2018-05-08 15:07:50 +02:00
2018-04-12 21:28:39 +02:00
2017-08-22 16:40:34 +02:00
2018-05-08 15:07:50 +02:00
2018-04-12 21:28:39 +02:00
2018-04-12 21:28:39 +02:00
2018-04-12 21:28:39 +02:00
2018-04-12 21:28:39 +02:00
2018-04-12 21:28:39 +02:00
2016-07-16 22:48:46 +02:00
2017-08-03 13:29:59 -07:00
2017-08-03 13:29:59 -07:00
2018-05-31 17:54:43 +02:00
2017-01-17 20:46:48 -05:00
2018-04-12 21:28:39 +02:00
2018-04-12 21:28:39 +02:00
2018-05-31 17:54:43 +02:00
2018-05-31 17:54:43 +02:00
2018-04-12 21:28:39 +02:00
2018-05-11 09:19:30 -04:00
2018-04-12 21:28:39 +02:00
2018-04-12 21:28:39 +02:00