mirror of
https://github.com/comma-hacks/webrtc.git
synced 2025-10-05 16:16:56 +08:00
integrate go secureput signaling, fix python version, document a bit, etc
This commit is contained in:
12
signaling/python/secret.py
Normal file
12
signaling/python/secret.py
Normal file
@@ -0,0 +1,12 @@
|
||||
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)
|
Reference in New Issue
Block a user