docs: update

This commit is contained in:
Dylan Araps 2019-02-24 23:14:37 +02:00
parent 7d9fe5e8ca
commit ed0cc25d27

8
pash
View File

@ -54,13 +54,13 @@ generate_password() {
# data from '/dev/urandom' to meet the length requirement. # data from '/dev/urandom' to meet the length requirement.
# example: 50 lines from /dev/urandom == 50 char password # example: 50 lines from /dev/urandom == 50 char password
mapfile -tn "${length:=50}" rand </dev/urandom mapfile -tn "${length:=50}" rand </dev/urandom
rand=${rand[*]} password=${rand[*]}
[[ $plain ]] && [[ $plain ]] &&
rand=${rand//[^[:alnum:]]} password=${password//[^[:alnum:]]}
rand=${rand//[^[:graph:]]} password=${password//[^[:graph:]]}
password=${rand:0:$length} password=${password:0:$length}
} }
check_entropy() { check_entropy() {