Skip to content

Commit

Permalink
Use crypto rand library
Browse files Browse the repository at this point in the history
  • Loading branch information
qshuai committed Oct 22, 2018
1 parent aff3d13 commit 3b7fa1f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions rstr/main.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package main

import (
"crypto/rand"
"encoding/base64"
"flag"
"fmt"
"math/rand"
"strconv"
"time"

"github.com/bcext/cashutil/base58"
"github.com/qshuai/tcolor"
Expand All @@ -27,7 +26,6 @@ func main() {
encode := flag.String("encode", string(base64Encoding), "Please input encode type (base64 encoded string with character '+/=')")
flag.Parse()

rand.Seed(time.Now().UnixNano())
if *length > bytesLengthLimit {
fmt.Println(tcolor.WithColor(tcolor.Yellow, "the input length too big. use default length: "+strconv.Itoa(defaultBytesLength)))
*length = defaultBytesLength
Expand Down

0 comments on commit 3b7fa1f

Please sign in to comment.