summaryrefslogtreecommitdiff
path: root/lib/keyringer/actions/pwgen
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-05-30 14:45:39 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-05-30 14:45:39 -0300
commita5e39bf904e83989b763f001a29adb9053df60f2 (patch)
tree7f81c07390b46b38a59b158f970d57f1cf3a70d2 /lib/keyringer/actions/pwgen
parent6c62a1906b59e4ab8eb3475ebfe3c3b7cfa67f0b (diff)
parent126eb39671e9c65c0c60a78b25189e4d4b1fae72 (diff)
downloadkeyringer-upstream_keyringer_0.5.3.tar.gz
keyringer-upstream_keyringer_0.5.3.tar.bz2
New upstream version 0.5.3upstream_keyringer_0.5.3
Diffstat (limited to 'lib/keyringer/actions/pwgen')
-rwxr-xr-xlib/keyringer/actions/pwgen4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/keyringer/actions/pwgen b/lib/keyringer/actions/pwgen
index 3c03681..e1e8947 100755
--- a/lib/keyringer/actions/pwgen
+++ b/lib/keyringer/actions/pwgen
@@ -13,12 +13,12 @@ FILE="$2"
# Generates a random passphrase
function keyringer_pwgen {
- ENTROPY_BYTES=${1:-20} # in bytes
+ ENTROPY_BYTES=${1:-40} # in bytes
ENTROPY_SOURCE="${ENTROPY_SOURCE:-/dev/urandom}"
# Strip possible newlines if output is wrapped.
# Also strip trailing = signs as they add nothing to the password's entropy.
- head -c $ENTROPY_BYTES $ENTROPY_SOURCE | base64 | tr -d '\n='
+ dd bs=1 count=$ENTROPY_BYTES if=$ENTROPY_SOURCE status=none | base64 | tr -d '\n='
echo
}