matrix-builder / services /api /app /utils /hashing.py
ruslanmv
Deploy: metrics + docs (Batch 12)
22b729d
Raw
History Blame Contribute Delete
260 Bytes
from __future__ import annotations
import hashlib
def sha256_text(value: str) -> str:
return "sha256:" + hashlib.sha256(value.encode("utf-8")).hexdigest()
def sha256_bytes(value: bytes) -> str:
return "sha256:" + hashlib.sha256(value).hexdigest()