If on linux use /dev/urandom as a random source - pee - Pee a password manager;… | |
git clone git://vernunftzentrum.de/pee.git | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 68423fd8d0b50e881e715610cbb6b34336586ad5 | |
parent 88416143f5476e68425e91b6f9dca81f74f837f4 | |
Author: Christian Kellermann <[email protected]> | |
Date: Tue, 12 Jan 2016 16:03:05 +0100 | |
If on linux use /dev/urandom as a random source | |
It's the same algorithm under the hood and it does not block. | |
Diffstat: | |
crypto-helper.scm | 2 ++ | |
1 file changed, 2 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/crypto-helper.scm b/crypto-helper.scm | |
@@ -26,6 +26,8 @@ | |
(define (random-bytes len) | |
(cond-expand (openbsd: | |
(arc4random len)) | |
+ (linux: | |
+ (with-input-from-file "/dev/urandom" (lambda () (read-… | |
(else | |
(with-input-from-file "/dev/random" (lambda () (read-u… | |
#+openbsd |