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