pub fn read_u32(&mut self) -> Result<u32> {
        if self.offset >= self.inner.len() {
            return Err(Error::UnexpectedEof);
        }

        let slice = &self.inner[self.offset..];
        if slice.len() < 4 {
            return Err(Error::InvalidFormat);
        }

        self.offset += 4;
        let value = u32::from_be_bytes(slice[..4].try_into().unwrap());

        Ok(value)
    }
/// Reads an `u32` value from the wrapped byte sequence and returns it.
///
/// # Example
/// ```rust
/// # use sshcerts::ssh::Reader;
/// let data = vec![0, 0, 0, 42];
/// let mut reader = Reader::new(&data);
/// let num = reader.read_u32().unwrap();
/// assert_eq!(num, 42);
/// ```
Reads an `u32` value from the wrapped byte sequence and returns it.
Reads an ` u32 ` value from the wrapped byte sequence and returns it .
pub fn read_u32(&mut self) -> Result<u32> {
        if self.offset >= self.inner.len() {
            return Err(Error::UnexpectedEof);
        }
        let slice = &self.inner[self.offset..];
        if slice.len() < 4 {
            return Err(Error::InvalidFormat);
        }
        self.offset += 4;
        let value = u32::from_be_bytes(slice[..4].try_into().unwrap());
        Ok(value)
    }
pub fn read_u32 ( & mut self ) -> Result < u32 > { if self . offset >= self . inner . len ( ) { return Err ( Error :: UnexpectedEof ) ; } let slice = & self . inner [ self . offset .. ] ; if slice . len ( ) < 4 { return Err ( Error :: InvalidFormat ) ; } self . offset += 4 ; let value = u32 :: from_be_bytes ( slice [ .. 4 ] . try_into ( ) . unwrap ( ) ) ; Ok ( value ) }
Reads an `u32` value from the wrapped byte sequence and returns it.
Reads an ` u32 ` value from the wrapped byte sequence and returns it .
&mut self
example
None
use sshcerts::ssh::reader;
None