ref: 954b2fd7a8a0a65a077b61a5932ed54d3e3ef6a5
parent: f6eb57283f625cbd20d5bb423331e88ddc82c8f1
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Oct 7 07:37:10 EDT 2018
Try /dev/urandom before /dev/random. Speeds things up on Linux.
--- a/lib/crypto/entropy.myr
+++ b/lib/crypto/entropy.myr
@@ -7,7 +7,10 @@
var randfd
const __init__ = {
- randfd = std.try(std.open("/dev/random", std.Oread))
+ match std.open("/dev/urandom", std.Oread)
+ | `std.Ok fd: randfd = fd
+ | `std.Err e: randfd = std.try(std.open("/dev/random", std.Oread))
+ ;;
}
const getentropy = {buf