Lines Matching refs:bytes
85 fn deserialize(bytes: &[u8], handles: &mut [Option<Handle>]) -> Result<Self, Self::Error> { in deserialize()
87 if bytes.len() < header_size { in deserialize()
95 let hdr = unsafe { &*(bytes.as_ptr() as *const hwwsk_req_hdr) }; in deserialize()
101 GenerateKeyReq::deserialize(&bytes[header_size..], handles)?, in deserialize()
104 Ok(HwWskCmd::Export(ExportKeyReq::deserialize(&bytes[header_size..], handles)?)) in deserialize()
145 fn deserialize(bytes: &[u8], _handles: &mut [Option<Handle>]) -> Result<Self, Self::Error> { in deserialize()
147 if bytes.len() < header_size { in deserialize()
156 unsafe { &*(bytes.as_ptr() as *const hwwsk_generate_key_req) }; in deserialize()
160 raw_key: Vec::try_alloc_from(&bytes[header_size..])?, in deserialize()
184 fn deserialize(bytes: &[u8], _handles: &mut [Option<Handle>]) -> Result<Self, Self::Error> { in deserialize()
185 Ok(Self { key_blob: Vec::try_alloc_from(bytes)? }) in deserialize()
220 fn deserialize(bytes: &[u8], _handles: &mut [Option<Handle>]) -> Result<Self, Self::Error> { in deserialize()
223 if bytes.len() < header_size { in deserialize()
227 let (cmd_bytes, rest) = bytes.split_at(mem::size_of::<u32>()); in deserialize()