예제 #1
0
 def test_sha256_checksum(self):
     test_file = self.get_test_loc('hash/dir1/a.png')
     assert sha256(
         test_file
     ) == u'1b598db6fee8f1ec7bb919c0adf68956f3d20af8c9934a9cf2db52e1347efd35'
예제 #2
0
파일: utils.py 프로젝트: hv7214/conan
def sha256_digest(location):
    """
    Return an algorithm-prefixed checksum for the file content at location.
    """
    return location and ('sha256:' + unicode(sha256(location)))