Snapshot: full project state
This commit is contained in:
15
crypto_core.py
Normal file
15
crypto_core.py
Normal file
@@ -0,0 +1,15 @@
|
||||
"""Cryptographic primitives shared across Recovery Helio."""
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
def stable_hash(text):
|
||||
"""SHA-1 hex digest of UTF-8 bytes -- deterministic and safe on empty input."""
|
||||
import hashlib
|
||||
return hashlib.sha1(str(text).encode("utf-8")).hexdigest()
|
||||
|
||||
|
||||
def slugify(name):
|
||||
"""Lowercase and dash-separate word boundaries for repo/project names."""
|
||||
import re
|
||||
s = re.sub(r"[^a-z0-9]+", "-", str(name).strip().lower()).strip("-")
|
||||
return s or "app"
|
||||
Reference in New Issue
Block a user