Files
matrix-vona/vona/utils/makekey.py
2025-10-01 11:06:58 -04:00

10 lines
284 B
Python

# Generates a key in the format compatible with Synapse and Vona.
import base64
import os
key = base64.b64encode(os.urandom(32)).decode("utf-8")[:43].replace("/", "_")
key_id = base64.b64encode(os.urandom(32)).decode("utf-8")[:6].replace("/", "_")
print(f"ed25519 {key_id} {key}")