github.com/LagrangeDev/LagrangeGo@v0.0.0-20240512064304-ad4a85e10cb4/utils/crypto/rand.go (about) 1 package crypto 2 3 import ( 4 _ "unsafe" // required by go:linkname 5 ) 6 7 // randuint32 returns a lock free uint32 value. 8 // 9 //go:linkname randuint32 runtime.fastrand 10 func randuint32() uint32 11 12 func RandU32() uint32 { 13 return randuint32() 14 }