Skip to main content

payload_digest_stream

Function payload_digest_stream 

Source
pub fn payload_digest_stream(entries: &[PayloadDigestEntry]) -> Result<Vec<u8>>
Expand description

Serialises payload entries into the canonical bytes a release commits to.

The format name is inside the stream rather than only beside it in the manifest, so a later revision cannot produce the same bytes for different rules, and the format field cannot be swapped without the hash noticing.

ยงErrors

When an entry carries an empty path, a NUL in its path, a duplicate path, or a digest that is not lowercase hex SHA-256.