projects
/
cmccabe-bin
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
cb7cd6e
)
pickrand.go: use longer random buffer
author
Colin P. Mccabe
<colin@cmccabe.xyz>
Thu, 22 Jul 2021 23:28:36 +0000 (16:28 -0700)
committer
Colin P. Mccabe
<colin@cmccabe.xyz>
Thu, 22 Jul 2021 23:28:36 +0000 (16:28 -0700)
pickrand.go
patch
|
blob
|
history
diff --git
a/pickrand.go
b/pickrand.go
index
1bf4844
..
79c4076
100644
(file)
--- a/
pickrand.go
+++ b/
pickrand.go
@@
-28,7
+28,7
@@
func main() {
fmt.Fprintf(os.Stderr, "** Error: %s\n", err.Error())
os.Exit(1)
}
- var b [8]byte
+ var b [16]byte
_, err = rand.Read(b[:])
if err != nil {
fmt.Fprintf(os.Stderr, "Failed to access cryptographic randomness. " +
@@
-42,5
+42,5
@@
func main() {
}
j := int(i.Uint64())
- fmt.Printf("%s\n", root + "/" + files[j])
+ fmt.Printf("%s\n", files[j])
}