all repos — dotfiles @ b66214d33ee936a2f56735f1b6637c471d86a5ff

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