From cb530f030f975afad01155d559e1d16b16bd3097 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Wed, 13 May 2015 17:00:55 +0300 Subject: [PATCH 1/1] Use /dev/urandom for new client identity generation * FreeBSD has /dev/random and it never blocks, giving as much entropy as requested * GNU/Linux has /dev/random can give shorter output * /dev/urandom exists in both systems and never blocks Signed-off-by: Sergey Matveev --- utils/newclient.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/newclient.sh b/utils/newclient.sh index ab86a7f..e741130 100755 --- a/utils/newclient.sh +++ b/utils/newclient.sh @@ -3,7 +3,7 @@ getrand() { local size=$1 - dd if=/dev/random bs=$size count=1 2>/dev/null | hexdump -ve '"%02x"' + dd if=/dev/urandom bs=$size count=1 2>/dev/null | hexdump -ve '"%02x"' } [ -n "$1" ] || { -- 2.44.0