md5hash/md5hash.py
def md5(file_path):
    """Calculates the md5-hash of the file.
    :param file_path: full path to the file.
    """

    hasher = hashlib.md5()
    with open(file_path, 'rb') as f:
        while True:
            buf = f.read(BLOCKSIZE)
            if not buf:
                break
            while len(buf) > 0:
                hasher.update(buf)
                buf = f.read(BLOCKSIZE)
    md5_hash = hasher.hexdigest().upper()
    return md5_hash
def md5(file_path):
    """Calculates the md5-hash of the file.
    :param file_path: full path to the file.
    """

    hasher = hashlib.md5()
    with open(file_path, 'rb') as f:
        while True:
            buf = f.read(BLOCKSIZE)
            if not buf:
                break
            while len(buf) > 0:
                hasher.update(buf)
                buf = f.read(BLOCKSIZE)
    md5_hash = hasher.hexdigest().upper()
    return md5_hash
def md5 ( file_path ) : hasher = hashlib . md5 ( ) with open ( file_path , 'rb' ) as f : while True : buf = f . read ( BLOCKSIZE ) if not buf : break while len ( buf ) > 0 : hasher . update ( buf ) buf = f . read ( BLOCKSIZE ) md5_hash = hasher . hexdigest ( ) . upper ( ) return md5_hash
Calculates the md5-hash of the file.
    :param file_path: full path to the file.
Calculates the md5 - hash of the file . : param file_path : full path to the file .