Skip to main content

encode_stream_block_with_provenance

Function encode_stream_block_with_provenance 

Source
pub fn encode_stream_block_with_provenance(
    prev_mac: &[u8],
    sequence_number: u64,
    epoch: u64,
    payloads: &[StreamPayloadData],
    provenance: Option<(&[u8], &[u8])>,
) -> Result<Vec<u8>>
Expand description

Encode a StreamBlock with an optional per-host provenance signature (#321).

provenance = None produces the canonical signed region — byte-identical to encode_stream_block — over which the provenance signature is computed (and which the consumer reconstructs to verify). provenance = Some((signer_kid, sig)) additionally populates the wire StreamBlock.provenance field.