feat(secure): add saving of reports into the report folder
This commit is contained in:
parent
d69d0a5f6b
commit
d8c184171d
5 changed files with 53 additions and 2 deletions
12
src/rmc/structures/qbuffer.rs
Normal file
12
src/rmc/structures/qbuffer.rs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
use std::io::Read;
|
||||
use crate::endianness::{IS_BIG_ENDIAN, ReadExtensions};
|
||||
use crate::rmc::structures::Result;
|
||||
pub fn read(reader: &mut impl Read) -> Result<Vec<u8>>{
|
||||
let size: u16 = reader.read_struct(IS_BIG_ENDIAN)?;
|
||||
|
||||
let mut vec = vec![0; size as usize];
|
||||
|
||||
reader.read_exact(&mut vec)?;
|
||||
|
||||
Ok(vec)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue