Skip to content

Instantly share code, notes, and snippets.

View juansolana's full-sized avatar

Juan Solana juansolana

View GitHub Profile
@itemir
itemir / md5_multipart_upload.py
Last active January 18, 2024 15:31
Python script to calculate MD5 hash of a multipart uploaded file (relevant for Object Storages like OCI Object Storage or AWS S3)
#!/usr/bin/python
import argparse
import hashlib
import sys
def md5(f, count):
hash_md5 = hashlib.md5()
eof = False
for i in range(count * 16):
chunk = f.read(65536)