def _write_buffer_to_hash(buffer_object, hash_obj, digest_block_size=8192):
 block = buffer_object.read(digest_block_size)
 while (len(block) > 0):
  hash_obj.update(block)
  block = buffer_object.read(digest_block_size)

def _write_buffer_to_hash ( buffer_object , hash_obj , digest_block_size = 8192 ) : block = buffer_object . read ( digest_block_size ) while ( len ( block ) > 0 ) : hash_obj . update ( block ) block = buffer_object . read ( digest_block_size )
read blocks from a buffer and update a hash with them .