def compute_sha1(source_path: str): pkg_sha1 = SimpleHash.hash_file(source_path) return binascii.hexlify(pkg_sha1).decode('utf8')
def hash(self): return 'sha1:' + binascii.hexlify(SimpleHash.hash_file( self.filename)).decode()