Пример #1
0
 def hash(self):
     """
     Function to calculate md5 hash of a big file
     """
     BLOCKSIZE = 65536
     hasher = hashprot()
     with open(self.path, 'rb') as fin:
         buf = fin.read(BLOCKSIZE)
         while len(buf) > 0:
             hasher.update(buf)
             buf = fin.read(BLOCKSIZE)
     return hasher.hexdigest() 
Пример #2
0
 def hash(self):
     hasher = hashprot(self.seq)
     #for i in self.chunks():
     #    hasher.update(i)
     return hasher.hexdigest()
Пример #3
0
 def refhash(self):
     hasher = hashprot(self.refseq)
     return hasher.hexdigest()