docs: update
This commit is contained in:
parent
7d9fe5e8ca
commit
ed0cc25d27
8
pash
8
pash
@ -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() {
|
||||||
|
Loading…
Reference in New Issue
Block a user