def h_file(filename): f = open(filename, 'rb') m = md5() while (filename): filename = f.read(100000) m.update(filename) f.close() return m.digest()
def h_file(filename): m = md5() try: m.hfile(filename) x = m.digest() if x is None: raise OSError("not a file") return x except SystemError: raise OSError("not a file" + filename)
def h_file(filename): m=md5() try: m.hfile(filename) x=m.digest() if x is None:raise OSError("not a file") return x except SystemError: raise OSError("not a file"+filename)
def h_file(filename): f = file(filename, "rb") m = md5() readBytes = 100000 while readBytes: readString = f.read(readBytes) m.update(readString) readBytes = len(readString) f.close() return m.digest()
def h_list(lst): m = md5() m.update(str(lst)) return m.digest()
def h_list(lst): m=md5() m.update(str(lst)) return m.digest()