MCPcopy Index your code
hub / github.com/Xpl0itU/passiveMachine / randomString

Function randomString

utils.go:15–24  ·  view source on GitHub ↗
(length int)

Source from the content-addressed store, hash-verified

13}
14
15func randomString(length int) string {
16 const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
17 seededRand := rand.New(rand.NewSource(time.Now().UnixNano()))
18
19 b := make([]byte, length)
20 for i := range b {
21 b[i] = charset[seededRand.Intn(len(charset))]
22 }
23 return string(b)
24}
25
26func generateEarnAppUUID() string {
27 return fmt.Sprintf("sdk-node-%x", md5.Sum([]byte(randomString(32))))

Callers 1

generateEarnAppUUIDFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected