code: def file_md5(self, file_name):
          
          file_contents = self._read_file(file_name)
          file_contents = file_contents + "\n"  # Cisco IOS automatically adds this
          file_contents = file_contents.encode("UTF-8")
          return hashlib.md5(file_contents).hexdigest()
docs: Compute MD5 hash of file.