Beispiel #1
0
 def verify(self):
     with open(self.data.storage.path, 'rb+') as f:
         return checksum(self.checksum_format, f) == self.checksum
Beispiel #2
0
 def generate_checksum(self, format='sha512'):
     with open(self.data.storage.path, 'rb+') as f:
         self.checksum = checksum(format, f)
         self.checksum_format = format