Skip to main content

validate_file_format

Function validate_file_format 

Source
pub fn validate_file_format(content: &[u8], expected_format: FileFormat) -> bool
Expand description

Validate file content using magic numbers for known binary formats

Performs format validation by checking magic numbers (file signatures) to prevent format confusion attacks and ensure file integrity