MCPcopy Create free account
hub / github.com/Loping151/RoverSign / generate_random_string

Function generate_random_string

RoverSign/utils/util.py:89–94  ·  view source on GitHub ↗
(length=32)

Source from the content-addressed store, hash-verified

87
88
89def generate_random_string(length=32):
90 # 定义可能的字符集合
91 characters = string.ascii_letters + string.digits + string.punctuation
92 # 使用random.choice随机选择字符,并连接成字符串
93 random_string = "".join(random.choice(characters) for i in range(length))
94 return random_string
95
96
97def generate_random_ipv6_manual():

Callers 1

get_community_headerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected