def chunk_hashes(data):
    chunk = 1024*1024
    chunk_count = int(math.ceil(len(data)/float(chunk)))
    return [hashlib.sha256(data[i*chunk:(i+1)*chunk]).digest() for i in range(chunk_count)]
Break up the byte-string into 1MB chunks and return sha256 hashes
dataset/ETHPy150Open uskudnik/amazon-glacier-cmd-interface/glacier/glaciercorecalls.py/chunk_hashes