(There is a bug in the current DownUpConnector which can cause it to give more bytes than you asked for on one request, and then less on the next, effectively shifting some of the bytes to an earlier request, but I think this bug never gets triggered in practice.)
self._crypttext_hasher.update(encrypted_piece)
encrypted_pieces.append(encrypted_piece)
+ precondition(length <= input_chunk_size,
+ "length=%d > input_chunk_size=%d" %
+ (length, input_chunk_size))
if allow_short:
if length < input_chunk_size:
# padding