Skip to main content

parse_frame

Function parse_frame 

Source
pub fn parse_frame(data: &[u8]) -> Result<ParsedFrame, StegoError>
Expand description

Parse a payload frame, verifying the CRC.

Supports both v1 (u16 length) and v2 (0x0000 sentinel + u32 length) formats. The input data may be larger than the actual frame (e.g. zero-padded).

Returns Err(StegoError::FrameCorrupted) if the CRC check fails or the frame is truncated.