mirror of
https://github.com/Casvt/MIND.git
synced 2026-04-03 03:00:22 -04:00
Changed generation and hashing of API keys
Moved from generating API keys using os.urandom to secrets.token_hex. Moved from hashing the keys using stdlib.hash to hashlib.sha256.
This commit is contained in:
@@ -54,6 +54,7 @@ class Constants:
|
||||
API_PREFIX = "/api"
|
||||
ADMIN_API_EXTENSION = "/admin"
|
||||
ADMIN_PREFIX = API_PREFIX + ADMIN_API_EXTENSION
|
||||
API_KEY_LENGTH = 32 # hexadecimal characters
|
||||
|
||||
DB_FOLDER = ("db",)
|
||||
DB_NAME = "MIND.db"
|
||||
|
||||
Reference in New Issue
Block a user