mirror of
https://github.com/MatthewL246/pretendo-docker.git
synced 2026-07-18 16:32:34 -05:00
Try to fix the password generation functions hanging
This commit is contained in:
parent
c37fdfa8aa
commit
d877efc842
|
|
@ -4,12 +4,12 @@ set -eu
|
|||
|
||||
generate_password() {
|
||||
length=$1
|
||||
tr -dc "a-zA-Z0-9" </dev/urandom | fold -w "$length" | head -n 1
|
||||
head /dev/urandom | tr -dc "a-zA-Z0-9" | head -c "$length"
|
||||
}
|
||||
|
||||
generate_hex() {
|
||||
length=$1
|
||||
tr -dc "A-F0-9" </dev/urandom | fold -w "$length" | head -n 1
|
||||
head /dev/urandom | tr -dc "a-zA-Z0-9" | head -c "$length"
|
||||
}
|
||||
|
||||
# Validate arguments
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user