espilon-source/tools/c3po/utils/genhash.py
2026-01-15 00:04:00 +01:00

14 lines
353 B
Python

import secrets
import hashlib
def generate_random_endpoint():
endpoint = f"/stream_{secrets.token_hex(4)}"
print(f"[+] Endpoint généré : {endpoint}")
return endpoint
def generate_token():
raw = secrets.token_bytes(8)
hashed = hashlib.sha256(raw).hexdigest()
print(f"[+] Bearer Token généré : {hashed}")
return hashed