mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-13 09:52:28 +08:00
协议密钥动态随机生成
This commit is contained in:
@@ -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