proc getRandomBytesNix {count {secure False}} { if $secure { set randFile /dev/random } else { set randFile /dev/urandom } set randDev [open $randFile rb] set random [read $randDev $count] close $randDev return $random }In almost all cases you do not need /dev/random, so normally you would call it like:
set random [getRandomBytesNix 16]
As always: comments, tips and questions are appreciated.