Home
last modified time | relevance | path

Searched refs:as_bytes (Results 1 – 25 of 45) sorted by relevance

12

/packages/modules/DnsResolver/doh/
Dencoding.rs72 url.host_str().ok_or_else(|| anyhow!("failed to get host"))?.as_bytes(), in dns_request()
74 h3::Header::new(b":path", path.as_bytes()), in dns_request()
104 assert_eq!(request[2].value(), url.host_str().unwrap().as_bytes()); in make_probe_query_and_request()
109 assert_eq!(request[3].value(), path.as_bytes()); in make_probe_query_and_request()
/packages/modules/Virtualization/pvmfw/avb/src/
Dpartition.rs35 CStr::from_bytes_with_nul(self.as_bytes()).unwrap() in as_cstr()
39 let partition_name = self.as_bytes(); in as_non_null_terminated_bytes()
43 fn as_bytes(&self) -> &[u8] { in as_bytes() method
/packages/modules/Virtualization/microdroid_manager/src/
Dswap.rs66 f.write_all(Uuid::new_v4().as_bytes())?; in mkswap()
70 f.write_all("SWAPSPACE2".as_bytes())?; in mkswap()
96 .write_all(format!("{}K", mem_kb).as_bytes())?; in init_swap()
Dinstance.rs98 if magic != DISK_HEADER_MAGIC.as_bytes() { in new()
229 self.file.write_all(uuid.as_bytes())?; in write_header_at()
/packages/modules/Virtualization/libs/devicemapper/src/
Dlib.rs103 spec.target_type.as_mut().write_all(target_type.as_bytes())?; in new()
116 data.name.as_mut().write_all(name.as_bytes())?; in new()
123 dst.write_all(uuid.as_bytes())?; in set_uuid()
157 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()
201 payload.extend_from_slice(data.as_bytes()); in create_device()
Dcrypt.rs185 buf.write_all(header.as_bytes())?; in build()
186 buf.write_all(body.as_bytes())?; in build()
Dverity.rs198 buf.write_all(header.as_bytes())?; in build()
199 buf.write_all(body.as_bytes())?; in build()
/packages/modules/Virtualization/rialto/tests/
Dtest.rs81 let request = Request::Reverse(message.as_bytes().to_vec()); in check_processing_reverse_request()
86 let expected_response: Vec<u8> = message.as_bytes().iter().rev().cloned().collect(); in check_processing_reverse_request()
206 assert_eq!(expected_component.code_hash, code_hash.as_bytes()); in check_vm_component()
208 assert_eq!(expected_component.authority_hash, authority_hash.as_bytes()); in check_vm_component()
253 asn1::SequenceOf::<asn1::Any, 3>::from_der(extension.extn_value.as_bytes()).unwrap(); in check_certificate_for_client_vm()
256 assert_eq!(csr_payload.challenge, challenge.as_bytes()); in check_certificate_for_client_vm()
/packages/modules/Virtualization/pvmfw/src/
Dbcc.rs79 diced_open_dice::kdf(cdi.as_slice(), &SALT, info.as_bytes(), result.as_mut_slice()) in taint_cdi()
171 entry[2].as_bytes() in payload_bytes()
192 let mode = if let Some(bytes) = value.as_bytes() { in is_debug_mode()
Dinstance.rs141 let plaintext = body.as_bytes(); in record_instance_entry()
151 blk[header.as_bytes().len()..].fill(0); in record_instance_entry()
/packages/modules/Virtualization/encryptedstore/src/
Dmain.rs141 if buf == UNFORMATTED_STORAGE_MAGIC.as_bytes() { in needs_formatting()
182 let source = CString::new(source.as_os_str().as_bytes())?; in mount()
183 let mountpoint = CString::new(mountpoint.as_os_str().as_bytes())?; in mount()
/packages/modules/Virtualization/virtualizationmanager/fsfdt/src/
Dlib.rs52 [fdt_node_path.to_bytes(), b"/", relative_path.as_bytes(), b"\0"].concat(), in overlay_onto()
74 let name = CString::new(entry_name.as_bytes()).unwrap(); in overlay_onto()
/packages/modules/Virtualization/microdroid/initrd/src/
Dmain.rs83 if magic_buf != BOOTCONFIG_MAGIC.as_bytes() { in detach_bootconfig()
121 output_file.write_all(BOOTCONFIG_MAGIC.as_bytes())?; in attach_bootconfig()
/packages/modules/Virtualization/virtualizationservice/vfio_handler/src/
Daidl.rs221 write(&unbind_path, device_str.as_bytes()) in try_bind_driver()
230 write(path.join("driver_override"), driver.as_bytes()) in try_bind_driver()
234 write(SYSFS_PLATFORM_DRIVERS_PROBE_PATH, device_str.as_bytes()) in try_bind_driver()
/packages/modules/Virtualization/vmbase/src/
Duart.rs54 for c in s.as_bytes() { in write_str()
Drand.rs144 Some(reordered.as_bytes().try_into().unwrap()) in rnd64()
/packages/modules/Virtualization/libs/cstr/src/
Dlib.rs24 const C: &::core::ffi::CStr = match ::core::ffi::CStr::from_bytes_with_nul(S.as_bytes()) {
/packages/modules/Bluetooth/system/rust/
Dbuild.rs19 dest_file.write_all(generated.as_bytes()).unwrap(); in main()
/packages/modules/Virtualization/zipfuse/src/
Dinode.rs219 let name = CString::new(name.as_bytes()).unwrap(); in from_zip()
271 let name = CString::new(name.as_bytes()).unwrap(); in check_dir()
284 let name = CString::new(name.as_bytes()).unwrap(); in check_file()
/packages/modules/Virtualization/libs/bssl/tests/
Dhmac_test.rs113 assert_eq!(HMAC_SHA256, hmac_sha256(KEY, DATA.as_bytes())?); in rfc4231_test_case_7()
/packages/modules/DnsResolver/doh/tests/doh_frontend/src/
Dclient.rs100 e.name() == b":path" && e.value().starts_with(URL_PATH_PREFIX.as_bytes()) in handle_http3_request()
142 quiche::h3::Header::new(b"content-length", len.to_string().as_bytes()), in handle_backend_message()
/packages/modules/Bluetooth/system/gd/rust/linux/mgmt/
Dbuild.rs20 f.write_all(format!("pub mod {}; \n", stem.to_str().unwrap()).as_bytes()).unwrap(); in gen_mod_rs()
/packages/modules/Bluetooth/tools/rootcanal/rust/test/SP/
DBV-05-C.in56 pin_code: "0".as_bytes(),
/packages/modules/Virtualization/virtualizationmanager/src/
Dmain.rs147 write(ready_fd.as_fd(), "o".as_bytes()) in main()
/packages/modules/Bluetooth/system/gd/rust/linux/stack/btif_macros/src/
Dlib.rs31 file.write_all(gen.to_string().as_bytes()).unwrap(); in debug_output_to_file()

12