User Tools

Site Tools


start
import hashlib
import sys

with open(sys.argv[1], "rb") as f:
    file_hash = hashlib.md5()
    while chunk := f.read(8192):
        file_hash.update(chunk)

print(file_hash.hexdigest())  # to get a printable str instead of bytes

These pages are a notepad with notes about technology and other stuff.


start.txt · Last modified: 2020/01/22 07:27 by rlunaro