#!/usr/bin/bash
#
#

echo -n Seed:
read -s seed
echo
hex=$(printf "$seed" | openssl dgst -sha512 -binary | xxd -ps | sed ':a;N;$!ba;s/\n//g' )
#
#printf "$hex"
#
l=${#hex}
p2=""
#
#echo $l
#
for ((i = 0; i < l; i += 2))
do
    h2=${hex:$i:2}
    b2="$((16#$h2))"
    if [[ ( $b2 -gt 0x20 && $b2 -lt 0x7F ) ]]; then
        #
        #echo $b2
        #
        p2+=$h2
    fi
done
echo "$p2" | xxd -r -p
echo
