An old question, but if anyone tripped over it, I would not advise it.
/proc/sys/kernel/random/uuid- this is type 4 (random) UUID with certain semantics - it is not just a string of random hexadecimal characters. For example, you will see that the first digit in the third group is always 4.
For 256 random bits, just read 32 bytes from /dev/random(uses external entropy, can block) or /dev/urandom(never blocks).
source
share