X-Git-Url: http://git.scottworley.com/overonion/blobdiff_plain/f5ec0b4b91687c7a34d4760381f6e7424f981127..b88d75ad2dc471edd9da2e0678e6788175305f9e:/overonion-make-key?ds=inline diff --git a/overonion-make-key b/overonion-make-key index 3b0289f..6cfc349 100755 --- a/overonion-make-key +++ b/overonion-make-key @@ -17,6 +17,12 @@ ciphers=( umask 077 +random_source="/dev/random" +if [[ "$1" == '--make_INSECURE_key' ]];then + shift + random_source="/dev/urandom" +fi + if (( $# != 1));then echo "usage: overonion-make-key keyfile" exit 1 @@ -30,7 +36,6 @@ fi i=0 while read -r cipher;do echo -n $'\r'"Generating key $((++i))/${#ciphers[*]}" - sleep 10 - cat >> "$keyfile" <<< "$cipher $(head -c 99 /dev/random | base64 --wrap=0 )" + cat >> "$keyfile" <<< "$cipher $(head -c 99 "$random_source" | base64 --wrap=0 )" done < <( IFS=$'\n'; shuf <<< "${ciphers[*]}"; ) echo