mirror of
https://github.com/comma-hacks/webrtc.git
synced 2025-09-27 04:26:31 +08:00
13 lines
253 B
Python
13 lines
253 B
Python
import random
|
|
|
|
runes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
|
|
|
def rand_seq(n):
|
|
b = []
|
|
for i in range(n):
|
|
b.append(random.choice(runes))
|
|
return "".join(b)
|
|
|
|
def generate_secret_key():
|
|
return rand_seq(32)
|