all repos — dotfiles @ 82f1e23836996f86bbb14f0b8bb297276ede6ce9

linux dotfiles

bin/misc/split_and_encrypt/genhash.sh

1 2 3 4 5 6 7 8 9 10 11
#!/usr/bin/bash

# generate random md5 hashes using /dev/urandom

for value in $(seq 0 $(expr $1 - 1))
do
    md5sum=$(dd status=none if=/dev/urandom bs=16 count=2 | md5sum |\
        cut -d ' ' -f 1 )
    # just using 16 chars of the hash
    echo ${md5sum::16}
done