{"blog_url":"https://oinume.hatenablog.com/","image_url":"https://blog.golang.org/gopher/gopher.png","width":"100%","version":"1.0","blog_title":"oinume journal","author_name":"oinume","title":"Generating an unpredictable random value in Go","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Foinume.hatenablog.com%2Fentry%2Fgenerating-an-unpredictable-random-value-in-go\" title=\"Generating an unpredictable random value in Go - oinume journal\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_url":"https://blog.hatena.ne.jp/oinume/","height":"190","provider_url":"https://hatena.blog","published":"2018-05-14 09:00:00","categories":["Go","in English"],"url":"https://oinume.hatenablog.com/entry/generating-an-unpredictable-random-value-in-go","provider_name":"Hatena Blog","description":"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 world example, UUID v4 uses crypto/rand internally. UUID v4) is r\u2026","type":"rich"}