def sha256(fileName):
    m = hashlib.sha256()
    try:
        fd = open(fileName,"rb")
    except IOError:
        print "Unable to open the file in readmode:", fileName
        return
    content = fd.readlines()
    fd.close()
    for eachLine in content:
        m.update(eachLine)
    return m.hexdigest()
Compute sha256 hash of the specified file
dataset/ETHPy150Open smart-classic/smart_server/smart/models/record_object.py/sha256