Skip to main content

parse_log_header

Function parse_log_header 

Source
pub fn parse_log_header(payload: &[u8]) -> Result<LogHeader, CryptError>
Expand description

Parses and validates an encrypted log record’s cleartext header.

The epoch and transaction number stay cleartext so frame scanning, recovery truncation, and range reads keep working — and so a reader can pick the right key epoch — without holding any key.

§Errors

Returns a CryptError when the header is truncated, is not a log record, or names an unsupported algorithm.