| from __future__ import annotations | |
| import hashlib | |
| from typing import Any | |
| from .normalization import normalize_signal | |
| def sha256_hex(value: str) -> str: | |
| return hashlib.sha256(value.encode("utf-8")).hexdigest() | |
| def hash_entity(entity_type: str, value: Any) -> str: | |
| normalized = normalize_signal(entity_type, value) | |
| if normalized is None: | |
| normalized = "" | |
| return sha256_hex(f"{entity_type}:{normalized}") | |
Xet Storage Details
- Size:
- 431 Bytes
- Xet hash:
- 3f8ac9f95c9089ee8912fc98a1c8f170bdb5f7244aa91154d1dacdb30984e5d8
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.