oinume journal

Scratchpad of what I learned

Entries from 2018-05-14 to 1 day

Generating an unpredictable random value in Go

There are a lot of examples to use math/rand. However, should use crypto/rand if you want to generate an unpredictable random value. That's because crypto/rand uses getrandom(2) if available, /dev/urandom otherwise on Linux. As a real worl…