添加strm生成

添加strm
This commit is contained in:
truewhile
2026-08-24 14:36:17 +08:00
parent cd1297a30f
commit c55d29ae84
47 changed files with 11956 additions and 4 deletions
+14
View File
@@ -0,0 +1,14 @@
package cloud115
import "math/rand"
const randCharset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
// RandomString 生成指定长度的随机字符串(PKCE code_verifier 等)。
func RandomString(length int) string {
b := make([]byte, length)
for i := range b {
b[i] = randCharset[rand.Intn(len(randCharset))]
}
return string(b)
}