Home
last modified time | relevance | path

Searched refs:as_slice (Results 1 – 25 of 53) sorted by relevance

123

/packages/modules/Virtualization/authfs/src/fsverity/
Deditor.rs377 .as_slice() in test_verified_writer_no_write()
390 .as_slice() in test_verified_writer_from_zero()
399 .as_slice() in test_verified_writer_from_zero()
408 .as_slice() in test_verified_writer_from_zero()
421 .as_slice() in test_verified_writer_unaligned()
430 .as_slice() in test_verified_writer_unaligned()
443 .as_slice() in test_verified_writer_with_hole()
452 .as_slice() in test_verified_writer_with_hole()
461 .as_slice() in test_verified_writer_with_hole()
474 .as_slice() in test_verified_writer_various_writes()
[all …]
/packages/modules/Bluetooth/system/gd/rust/linux/utils/src/
Dadv_parser.rs141 let flags = extract_flags(payload.as_slice()); in test_extract_flags()
148 let uuids = extract_service_uuids(payload.as_slice()); in test_extract_service_uuids()
184 let uuids = extract_service_uuids(payload.as_slice()); in test_extract_service_uuids()
206 let name = extract_name(payload.as_slice()); in test_extract_name()
210 let name = extract_name(payload.as_slice()); in test_extract_name()
214 let name = extract_name(payload.as_slice()); in test_extract_name()
221 let service_data = extract_service_data(payload.as_slice()); in test_extract_service_data()
275 let service_data = extract_service_data(payload.as_slice()); in test_extract_service_data()
298 let manufacturer_data = extract_manufacturer_data(payload.as_slice()); in test_extract_manufacturer_data()
302 let manufacturer_data = extract_manufacturer_data(payload.as_slice()); in test_extract_manufacturer_data()
[all …]
Dsocket.rs67 v.extend_from_slice(self.opcode.to_le_bytes().as_slice()); in write_to_wire()
68 v.extend_from_slice(self.index.to_le_bytes().as_slice()); in write_to_wire()
69 v.extend_from_slice(self.len.to_le_bytes().as_slice()); in write_to_wire()
70 v.extend_from_slice(self.data.as_slice()); in write_to_wire()
177 v.extend_from_slice(self.hci_id.to_le_bytes().as_slice()); in to_data()
178 v.extend_from_slice(self.suspended.to_le_bytes().as_slice()); in to_data()
396 wire_data.as_slice().as_ptr() as *const libc::c_void, in write_mgmt_packet()
/packages/modules/Virtualization/apkdmverity/src/
Dmain.rs194 f.write_all(vec![0; padding as usize].as_slice()).unwrap(); in create_block_aligned_file()
244 assert_eq!(verity.as_slice(), original.as_slice()); in correct_inputs()
261 run_test(modified_apk.as_slice(), idsig.as_ref(), "incorrect_apk", |ctx| { in incorrect_apk()
284 run_test(apk.as_ref(), modified_idsig.as_slice(), "incorrect_merkle_tree", |ctx| { in incorrect_merkle_tree()
327 assert_eq!(verity.as_slice(), original.as_slice()); in tampered_idsig()
379 assert_eq!(verity.as_slice(), original.as_slice()); in inputs_are_block_devices()
401 assert_eq!(verity.as_slice(), original.as_slice()); in correct_custom_roothash()
/packages/modules/Virtualization/libs/bssl/tests/
Dhkdf_test.rs36 assert_eq!(OKM, hkdf::<L>(&IKM, &SALT, &INFO, Digester::sha256())?.as_slice()); in rfc5869_test_case_1()
75 assert_eq!(OKM, hkdf::<L>(&IKM, &SALT, &INFO, Digester::sha256())?.as_slice()); in rfc5869_test_case_2()
93 assert_eq!(OKM, hkdf::<L>(&IKM, &SALT, &INFO, Digester::sha256())?.as_slice()); in rfc5869_test_case_3()
/packages/modules/Virtualization/pvmfw/src/
Dbcc.rs65 vec![(1.into(), cdi_attest.as_slice().into()), (2.into(), cdi_seal.as_slice().into())]; in truncate()
79 diced_open_dice::kdf(cdi.as_slice(), &SALT, info.as_bytes(), result.as_mut_slice()) in taint_cdi()
115 let is_debug_mode = is_any_entry_debug_mode(entries.as_slice())?; in new()
Dinstance.rs94 Ok(AeadContext::new(Aead::aes_256_gcm_randnonce(), key.as_slice(), /* tag_len */ None)?) in aead_ctx_from_secret()
211 let header = Header::read_from_prefix(blk.as_slice()).unwrap(); in locate_entry()
219 let header = EntryHeader::read_from_prefix(blk.as_slice()).unwrap(); in locate_entry()
Ddice.rs160 config.push((cbor!(INSTANCE_HASH_KEY)?, Value::from(instance_hash.as_slice()))); in generate_config_descriptor()
287 assert_eq!(*config_map.get(&INSTANCE_HASH_KEY).unwrap(), Value::from(HASH.as_slice())); in config_descriptor_with_instance_hash()
/packages/modules/Virtualization/service_vm/requests/src/
Dkeyblob.rs76 let aead_ctx = AeadContext::new(Aead::aes_256_gcm(), kek.as_slice(), tag_len)?; in new()
87 let aead_ctx = AeadContext::new(Aead::aes_256_gcm(), kek.as_slice(), tag_len)?; in decrypt_private_key()
135 assert_eq!(TEST_KEY, decrypted_key.as_slice()); in decrypting_keyblob_succeeds_with_the_same_kek()
/packages/modules/Virtualization/libs/dice/sample_inputs/src/
Dsample_inputs.rs126 Config::Descriptor(config_descriptor.as_slice()), in make_sample_bcc_and_cdis()
158 Config::Descriptor(config_descriptor.as_slice()), in make_sample_bcc_and_cdis()
182 Config::Descriptor(config_descriptor.as_slice()), in make_sample_bcc_and_cdis()
/packages/modules/Bluetooth/floss/hcidoc/packets/
Dbuild.rs43 String::from_utf8_lossy(output.stderr.as_slice()) in generate_packets()
61 String::from_utf8_lossy(output.stderr.as_slice()) in generate_packets()
/packages/modules/Bluetooth/tools/rootcanal/rust/src/lmp/
Dec.rs54 pub fn as_slice(&self) -> &[u8] { in as_slice() method
62 self.as_slice().len() in size()
73 BigInt::from_signed_bytes_le(&self.as_slice()[0..self.size() / 2]) in get_x()
77 BigInt::from_signed_bytes_le(&self.as_slice()[self.size() / 2..self.size()]) in get_y()
143 pub fn as_slice(&self) -> &[u8] { in as_slice() method
151 BigInt::from_signed_bytes_le(self.as_slice()) in to_bigint()
/packages/modules/Virtualization/libs/apkverify/src/
Dhashtree.rs213 assert_eq!(golden_hash_tree.as_slice(), ht.tree.as_slice()); in compare_with_golden_output()
214 assert_eq!(golden_root_hash, ht.root_hash.as_slice()); in compare_with_golden_output()
Dv4.rs360 assert_eq!(fs::read(&idsig_path).unwrap(), output.get_ref().as_slice()); in parse_and_compose()
382 created.merkle_tree().unwrap().as_slice(), in digest_from_apk()
383 golden.merkle_tree().unwrap().as_slice() in digest_from_apk()
/packages/modules/Bluetooth/floss/hcidoc/src/
Dparser.rs299 LinuxSnoopOpcodes::Command => match Command::parse(item.data.as_slice()) { in try_from()
304 LinuxSnoopOpcodes::Event => match Event::parse(item.data.as_slice()) { in try_from()
309 LinuxSnoopOpcodes::AclTxPacket => match Acl::parse(item.data.as_slice()) { in try_from()
314 LinuxSnoopOpcodes::AclRxPacket => match Acl::parse(item.data.as_slice()) { in try_from()
319 LinuxSnoopOpcodes::NewIndex => match NewIndex::parse(item.data.as_slice()) { in try_from()
/packages/modules/Virtualization/libs/devicemapper/src/
Dlib.rs157 self.create_device(name, target.as_slice(), uuid("crypto".as_bytes())?, true) in create_crypt_device()
163 self.create_device(name, target.as_slice(), uuid("apkver".as_bytes())?, false) in create_verity_device()
357 assert_eq!(inputimg, crypt.as_slice()); in mapping_again_keeps_data()
405 assert_ne!(inputimg, crypt.as_slice()); in data_inaccessible_with_diff_key()
Dcrypt.rs75 pub fn as_slice(&self) -> &[u8] { in as_slice() method
187 buf.write_all(vec![0; padding].as_slice())?; in build()
Dverity.rs65 pub fn as_slice(&self) -> &[u8] { in as_slice() method
200 buf.write_all(vec![0; padding].as_slice())?; in build()
/packages/modules/Virtualization/service_vm/fake_chain/src/
Dclient_vm.rs110 Config::Descriptor(config_descriptor.as_slice()), in fake_client_vm_dice_artifacts()
133 Config::Descriptor(config_descriptor.as_slice()), in fake_client_vm_dice_artifacts()
Dservice_vm.rs124 Config::Descriptor(config_descriptor.as_slice()), in fake_dice_artifacts_up_to_pvmfw()
166 Config::Descriptor(config_descriptor.as_slice()), in fake_service_vm_dice_artifacts()
/packages/modules/Virtualization/virtualizationmanager/fsfdt/src/
Dmain.rs41 fs::write(&opt.fdt_file_path, fdt.as_slice()).unwrap(); in main()
/packages/modules/Bluetooth/system/gd/rust/linux/stack/src/
Dbluetooth_adv.rs2141 [exp_16.as_slice(), exp_32.as_slice(), exp_128.as_slice()].concat(); in test_append_service_uuids()
2151 [exp_16.as_slice(), exp_32.as_slice(), exp_128.as_slice()].concat(); in test_append_service_uuids()
2170 [exp_16.as_slice(), exp_32.as_slice(), exp_128.as_slice()].concat(); in test_append_solicit_uuids()
/packages/modules/Virtualization/tests/libs/libdts/src/
Dlib.rs65 stdin.write_all(fdt.as_slice())?; in from_fdt()
/packages/modules/Virtualization/virtualizationservice/vfio_handler/src/
Daidl.rs302 let dt_table_header = DtTableHeader::read_from(values.as_slice()) in get_dt_table_header()
332 let dt_table_entry = DtTableEntry::read_from(values.as_slice()) in get_dt_table_entry()
/packages/modules/Bluetooth/tools/rootcanal/rust/
Dbuild.rs83 String::from_utf8_lossy(output.stderr.as_slice()) in generate_module()

123