예제 #1
0
 def compute_sha1(source_path: str):
     pkg_sha1 = SimpleHash.hash_file(source_path)
     return binascii.hexlify(pkg_sha1).decode('utf8')
예제 #2
0
 def hash(self):
     return 'sha1:' + binascii.hexlify(SimpleHash.hash_file(
         self.filename)).decode()