pub fn validate_buffer_size(
buffer: &[u8],
expected_size: usize,
) -> Result<(), MathError>Expand description
Validate buffer size for byte array operations.
§Arguments
buffer- The buffer to validateexpected_size- The expected buffer size
§Returns
Returns Ok(()) if the buffer size is correct, or an error otherwise.
§Errors
Returns MathError::BufferTooSmall or MathError::BufferTooLarge if the buffer size is incorrect.