协议密钥动态随机生成

This commit is contained in:
huangxiaolei committed 2022-11-28 23:36:57 +08:00
1 parent 362ca86130
commit 746435cf3c
22 files changed
+173 -172

No files matched your search

+4
View File
@@ -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++ {