Backend Stability, Basically functional.

This commit is contained in:
2025-10-27 12:38:22 +08:00
parent d0d3373b3b
commit 4ea30cc12e
59 changed files with 5034 additions and 35 deletions

View File

@@ -0,0 +1,13 @@
from hashlib import blake2b
def hash_token(token, secret, salt):
# first iteration
h1 = blake2b(digest_size=32)
h1.update((token + secret + salt).encode("utf-8"))
hash1 = h1.digest()
# second iteration
h2 = blake2b(digest_size=32)
h2.update(hash1)
return h2.hexdigest().lower()
print(hash_token("my-test-token", "local_dev_secret_change_for_production_12345678901234567890", "testgroup"))