Apr 212014
… well, literally… or pseudo literally?
To generate 128 bits of pseudo-randomness:
dd if=/dev/urandom bs=16 count=1 2>/dev/null| hexdump |awk '{$1=""; printf("%s", $0)}' | sed 's/ //g'
Block size 16 = 16 bytes… do that once (count=1); that’s 16 bytes * 8 bits/byte = 128 bits. I’ve been using this in scripts lately, like “foo=$(…)”.
Sorry, the comment form is closed at this time.