pash: Added comment about /dev/urandom

This commit is contained in:
Dylan Araps 2019-11-30 16:39:01 +00:00
parent 3065aa621a
commit 605faef0f0
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 3 additions and 0 deletions

3
pash
View File

@ -12,6 +12,9 @@ pw_add() {
#
# The 'dd' command is then used to read only the desired
# password length.
#
# Regarding usage of '/dev/urandom' instead of '/dev/random'.
# See: https://www.2uo.de/myths-about-urandom
pass=$(LC_ALL=C tr -dc "${PASH_PATTERN:-_A-Z-a-z-0-9}" < /dev/urandom |
dd ibs=1 obs=1 count="${PASH_LENGTH:-50}" 2>/dev/null)