我是python编程的新手,因此在这一节我感到困惑。当我在代码中分配一个blocksize时,比如说,blocksize=512,它是以字节为单位的吗?你知道吗
BLOCKSIZE = 65536
start_time = process_time()
hasher = hashlib.sha512()
with open(file_dir+file_name, 'rb') as hashfile:
buf = hashfile.read(BLOCKSIZE)
while len(buf) > 0:
hasher.update(buf)
buf = hashfile.read(BLOCKSIZE)
hashfile.close()
目前没有回答
相关问题 更多 >
编程相关推荐