usergen: Remove dependency against sha256sum(1)

sha256sum(1) is a GNU utility that might not be available under some
POSIX systems. Since OpenSSL is already a dependency, it makes sense to
reuse it to generate SHA256 digests.
This commit is contained in:
Xavier Del Campo Romero 2023-09-16 00:57:34 +02:00
parent 18bd0d83be
commit bec528a979
Signed by: xavi
GPG Key ID: 84FF3612A9BF43F2
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ ROUNDS=1000
for i in $(seq $ROUNDS)
do
printf "\r%d/$ROUNDS" $i >&2
PWD=$(printf '%s' "$PWD" | to_bin | sha256sum | cut -d' ' -f1)
PWD=$(printf '%s' "$PWD" | to_bin | openssl sha256 -r | cut -d' ' -f1)
done
echo >&2