Use longer password in example script
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
349e8aa761
commit
04e405e6e8
1 changed files with 2 additions and 2 deletions
|
@ -18,8 +18,8 @@ SECRET=${1:-}
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Generate a random 8 character password
|
# Generate a random 20 character password
|
||||||
pass=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c 8 || true)
|
pass=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c 20 || true)
|
||||||
|
|
||||||
# Encrypt the secret
|
# Encrypt the secret
|
||||||
ciphertext=$(echo "${SECRET}" | openssl aes-256-cbc -base64 -pass "pass:${pass}" -iter 300000 -md sha512 2>/dev/null)
|
ciphertext=$(echo "${SECRET}" | openssl aes-256-cbc -base64 -pass "pass:${pass}" -iter 300000 -md sha512 2>/dev/null)
|
||||||
|
|
Loading…
Reference in a new issue