Changed the max number to the max in64 value
This commit is contained in:
+2
-1
@@ -9,6 +9,7 @@ import (
|
|||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"math"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"regexp"
|
"regexp"
|
||||||
)
|
)
|
||||||
@@ -24,7 +25,7 @@ func HashMAC(message, key []byte) string {
|
|||||||
|
|
||||||
// GenerateSessionID Generate a new random Hash
|
// GenerateSessionID Generate a new random Hash
|
||||||
func GenerateSessionID() string {
|
func GenerateSessionID() string {
|
||||||
MAX := 999999999
|
MAX := math.MaxInt64
|
||||||
|
|
||||||
return fmt.Sprintf("%d.%d", rand.Intn(MAX), rand.Intn(MAX))
|
return fmt.Sprintf("%d.%d", rand.Intn(MAX), rand.Intn(MAX))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user