Lines Matching refs:blk
112 let mut blk = [0; BLK_SIZE]; in get_recorded_entry() localVariable
113 if payload_size > blk.len() { in get_recorded_entry()
118 instance_img.read_block(payload_index, &mut blk).map_err(Error::FailedIo)?; in get_recorded_entry()
120 let payload = &blk[..payload_size]; in get_recorded_entry()
140 let mut blk = [0; BLK_SIZE]; in record_instance_entry() localVariable
143 assert!(plaintext.len() + aead_ctx.aead().max_overhead() < blk.len()); in record_instance_entry()
144 let encrypted = aead_ctx.seal(plaintext, /* nonce */ &[], /* ad */ &[], &mut blk)?; in record_instance_entry()
147 instance_img.write_block(payload_index, &blk).map_err(Error::FailedIo)?; in record_instance_entry()
150 header.write_to_prefix(blk.as_mut_slice()).unwrap(); in record_instance_entry()
151 blk[header.as_bytes().len()..].fill(0); in record_instance_entry()
152 instance_img.write_block(header_index, &blk).map_err(Error::FailedIo)?; in record_instance_entry()
206 let mut blk = [0; BLK_SIZE]; in locate_entry() localVariable
209 partition.read_block(header_index, &mut blk).map_err(Error::FailedIo)?; in locate_entry()
211 let header = Header::read_from_prefix(blk.as_slice()).unwrap(); in locate_entry()
217 partition.read_block(header_index, &mut blk).map_err(Error::FailedIo)?; in locate_entry()
219 let header = EntryHeader::read_from_prefix(blk.as_slice()).unwrap(); in locate_entry()