21 lines
263 B
Go
21 lines
263 B
Go
package main
|
|
|
|
import (
|
|
"encoding/binary"
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
func main() {
|
|
f, err := os.Open("/dev/random")
|
|
defer f.Close()
|
|
|
|
if err != nil {
|
|
fmt.Println(err)
|
|
return
|
|
}
|
|
|
|
var seed int64
|
|
binary.Read(f, binary.LittleEndian, &seed)
|
|
fmt.Println("Seed:", seed)
|
|
}
|