Signal-Message-Backup-Tests/scripts/generate-base64-bytes.sh
2024-05-20 13:33:22 -07:00

15 lines
203 B
Bash
Executable File

#!/usr/bin/env sh
if ! command -v openssl > /dev/null; then
echo "Error: OpenSSL not installed!"
exit 1
fi
if [ "$#" -ne 1 ]; then
length=32
else
length="$1"
fi
openssl rand -base64 "$length"