协议密钥动态随机生成
This commit is contained in:
1 parent
362ca86130
commit
746435cf3c
22 files changed
+173
-172
No files matched your search
@@ -10,6 +10,10 @@ func init() {
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
}
|
||||
|
||||
func GetTimeRand() *rand.Rand {
|
||||
return rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
}
|
||||
|
||||
func GetRandomStr(strLen int) (str string) {
|
||||
baseStr := "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
|
||||
for i := 0; i < strLen; i++ {
|
||||
|
||||
Reference in new issue
Block a user