* Try to get <b>out_len</b> bytes of the strongest entropy we can generate,
* storing it into <b>out</b>.
**/
- void
- crypto_strongest_rand(uint8_t *out, size_t out_len)
+ MOCK_IMPL(void,
+ crypto_strongest_rand,(uint8_t *out, size_t out_len))
{
-#define DLEN SHA512_DIGEST_LENGTH
+#define DLEN DIGEST512_LEN
+
/* We're going to hash DLEN bytes from the system RNG together with some
- * bytes from the openssl PRNG, in order to yield DLEN bytes.
+ * bytes from the PRNGs from our crypto librar(y/ies), in order to yield
+ * DLEN bytes.
*/
- uint8_t inp[DLEN*2];
+ uint8_t inp[DLEN*3];
uint8_t tmp[DLEN];
tor_assert(out);
while (out_len) {