10 lines
284 B
Python
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}")
|