pub fn write_entry(
out: &mut Vec<u8>,
codec: CodecId,
crypto: CryptoId,
orig_len: u64,
nonce_tag: Option<([u8; 12], [u8; 16])>,
payload: &[u8],
)Available on crate feature
enc only.Expand description
Appends one complete entry – header followed by payload – to out.
orig_len is the length of the file before compression, and nonce_tag
carries the AEAD nonce and tag when the payload was sealed. Pass None
for a plaintext entry; crypto and nonce_tag have to agree, since
read_header decides whether to expect the 28 nonce-and-tag bytes from
crypto alone.