def test_sha256_checksum(self): test_file = self.get_test_loc('hash/dir1/a.png') assert sha256( test_file ) == u'1b598db6fee8f1ec7bb919c0adf68956f3d20af8c9934a9cf2db52e1347efd35'
def sha256_digest(location): """ Return an algorithm-prefixed checksum for the file content at location. """ return location and ('sha256:' + unicode(sha256(location)))