Command line:
date +%s%N | sha512sum | head -c12
In shell script:
PASSWORD=$(date +%s%N | sha512sum | head -c12)
Where:
date +%s%N - nanoseconds passed from the 00:00:00 UTC on 1 January 1970
sha512sum - The sha512sum command displays or check SHA512 (512-bit) checksums.
head -c12 - take first 12 symbols
No comments:
Post a comment