pub fn encode_parallel(
shared_secret: &[u8],
plaintext: &[u8],
aad: &[u8],
chunk_size: usize,
pool: Option<&EntropyPool>,
) -> Result<KkParallelPacket>Expand description
Encode a large payload in parallel by splitting it into chunks.
Each chunk is encrypted independently via encode_aead (or the pooled
variant when a pool is provided). All chunks are processed in parallel
using Rayon. A Merkle root over the chunk commitments binds the entire
payload together.
ยงArguments
shared_secret- the pre-shared keyplaintext- the full payload to encryptaad- associated data, authenticated on every chunkchunk_size- bytes per chunk (usePARALLEL_CHUNK_SIZEfor default 1 MiB)pool- optionalEntropyPoolfor high-throughput paths