If on linux use /dev/urandom as a random source - pee - Pee a password manager;Pee - because you have to...
(HTM) git clone git://vernunftzentrum.de/pee.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 68423fd8d0b50e881e715610cbb6b34336586ad5
(DIR) parent 88416143f5476e68425e91b6f9dca81f74f837f4
(HTM) Author: Christian Kellermann <ckeen@pestilenz.org>
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(-)
---
(DIR) 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-u8vector len))))
(else
(with-input-from-file "/dev/random" (lambda () (read-u8vector len))))))
#+openbsd