from typing import BinaryIO
import hashlib


def get_md5(f: BinaryIO) -> str:
    """Make an MD5 hash of the page's contents."""
    BLOCKSIZE = 65536
    hasher = hashlib.md5()
    buf = f.read(BLOCKSIZE)
    while len(buf) > 0:
        hasher.update(buf)
        buf = f.read(BLOCKSIZE)
    return hasher.hexdigest()