The Codebase Consistency Update

This commit is contained in:
2025-10-21 23:47:28 -04:00
parent 458d69da84
commit 6cc08fcb02
21 changed files with 339 additions and 130 deletions

View File

@@ -8,4 +8,4 @@ a = [
for t in a:
print(f"\t{t}")
print("")
print("")

View File

@@ -1,7 +1,12 @@
import urllib.parse, time, json, httpx
import vona.globals as globals
import vona.config as config
import urllib.parse
import time
import json
import httpx
http_client = globals.http_client()
versions = [

View File

@@ -1,25 +1,23 @@
# Generates a key in the format compatible with Synapse and Vona.
import base64
import os
# Generates a key in the format compatible with Synapse and Vona.
def mkchar() -> str:
return os.urandom(4).hex()[:1]
key = (
base64.b64encode(os.urandom(32))
.decode("utf-8")[:43]
.replace("/", mkchar())
.replace("+", mkchar())
)
def random(length):
return (
base64.b64encode(os.urandom(length))
.decode("utf-8")[:length]
.replace("/", mkchar())
.replace("+", mkchar())
)
key_id = (
base64.b64encode(os.urandom(32))
.decode("utf-8")[:6]
.replace("/", mkchar())
.replace("+", mkchar())
)
key = random(43)
key_id = random(6)
print(f"ed25519 {key_id} {key}")