Skip to main content

write_piece

Function write_piece 

Source
fn write_piece(
    out: &mut impl Write,
    cipher: &XChaCha20Poly1305,
    name: &str,
    index: u64,
    end: bool,
    plain: &[u8],
) -> Result<()>
Expand description

A piece sealed and written: its length (its top bit set for the end), its nonce, what is sealed.