Implement lab4 S3 attachments and reliability checks

This commit is contained in:
Polusikkkk
2026-11-05 18:42:22 +03:00
parent ec540a1a72
commit 0f6615dbb9
51 changed files with 6018 additions and 23 deletions
+12
View File
@@ -0,0 +1,12 @@
from __future__ import annotations
import hashlib
def object_lock_id(bucket: str, object_key: str) -> int:
value = f"s3-object\0{bucket}\0{object_key}".encode("utf-8")
return int.from_bytes(
hashlib.sha256(value).digest()[:8],
byteorder="big",
signed=True,
)