Better function name for random bytes. Try /dev/urandom first. Don't return false after throwing an exception.