As you probably noticed from each of the answers, you generally have to "resort to a program".
However, without using any external executables, in Bash and ksh:
for i in {0..31}; do string+=$(printf "%x" $(($RANDOM%16)) ); done; echo $string
in zsh:
for i in {0..31}; do string+=$(printf "%x" $(($RANDOM%16)) ); dummy=$RANDOM; done; echo $string
Note that because of using the mod operator on a value that ranges from 0 to 32767 the distribution of digits using the snippets above will be skewed (not to mention the fact that the numbers are pseudo random in the first place).
In any case, the correct way to do this is using mktemp
as in oraz's answer.