协议密钥动态随机生成

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

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++ {