Skip to content

Commit e4a6076

Browse files
committed
Seed RNG here
1 parent e44f663 commit e4a6076

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ module github.com/dgurney/unikey-mod7
22

33
go 1.16
44

5-
require github.com/dgurney/unikey v0.1.0
5+
require github.com/dgurney/unikey v0.1.1
66

77
// replace github.com/dgurney/unikey => ../unikey

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github.com/dgurney/unikey v0.1.0 h1:iKwY6+XLnIvkapfJJeOzB0aDO4pOqGJStGij6lGTUIA=
2-
github.com/dgurney/unikey v0.1.0/go.mod h1:vHqV5+bSBPDtT7q2cxY9DBC/gizehUa/pgbqbWpyL0k=
1+
github.com/dgurney/unikey v0.1.1 h1:lAqlsJcNVunt9MXnvyewImxdKmxFv10D0Xh9QNN0FNI=
2+
github.com/dgurney/unikey v0.1.1/go.mod h1:vHqV5+bSBPDtT7q2cxY9DBC/gizehUa/pgbqbWpyL0k=

main.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,18 @@ package main
1717
import (
1818
"flag"
1919
"fmt"
20+
"math/rand"
2021
"time"
2122

2223
"github.com/dgurney/unikey/generator"
2324
"github.com/dgurney/unikey/validator"
2425
)
2526

26-
const version = "0.1.3"
27+
const version = "0.1.5"
28+
29+
func init() {
30+
rand.Seed(time.Now().UnixNano())
31+
}
2732

2833
func main() {
2934
bench := flag.Int("bench", 0, "Benchmark generation and validation of N*3 keys.")

0 commit comments

Comments
 (0)