all repos — dotfiles @ 3b2c094af138f46b4a7c4dc278371f1534e42bbc

linux dotfiles

bin/misc/split_and_encrypt/genhash.sh (view raw)

 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