Home
last modified time | relevance | path

Searched refs:from_bytes (Results 1 – 8 of 8) sorted by relevance

/linux/rust/kernel/
H A Dstr.rs39 pub const fn from_bytes(bytes: &[u8]) -> &Self { in from_bytes() method
58 .map(Self::from_bytes) in strip_prefix()
150 BStr::from_bytes(&self.0[index]) in index()
156 BStr::from_bytes(self) in as_ref()
182 const C: &'static $crate::str::BStr = $crate::str::BStr::from_bytes(S.as_bytes());
375 BStr::from_bytes(self.to_bytes()) in as_ref()
486 let hello_world = BStr::from_bytes(b"hello, world!"); in test_bstr_display()
488 let escapes = BStr::from_bytes(b"_\t_\n_\r_\\_\'_\"_"); in test_bstr_display()
490 let others = BStr::from_bytes(b"\x01"); in test_bstr_display()
492 let non_ascii = BStr::from_bytes(b"d\xe9j\xe0 vu"); in test_bstr_display()
[all …]
H A Dtransmute.rs22 /// let result = u32::from_bytes(&raw)?;
45 fn from_bytes(bytes: &[u8]) -> Option<&Self> in from_bytes() method
63 /// This method is similar to [`Self::from_bytes`], with the difference that `bytes` does not
78 Self::from_bytes(prefix).map(|s| (s, remainder)) in from_bytes_prefix()
127 /// Unlike [`FromBytes::from_bytes`], which requires aligned input, this method can be used on
/linux/scripts/crypto/
H A Dgen-hash-testvecs.py36 self.r = int.from_bytes(key[:16], byteorder='little') & rclamp
37 self.s = int.from_bytes(key[16:], byteorder='little')
43 c = int.from_bytes(chunk, byteorder='little') + 2**(8 * len(chunk))
61 self.h = int.from_bytes(key, byteorder='little')
68 self.acc ^= int.from_bytes(data[i:i+16], byteorder='little')
189 return int.from_bytes(bytestr[pos//8 : pos//8 + length//8], byteorder='little')
/linux/drivers/gpu/nova-core/gsp/
H A Dfw.rs604 Ok(*RegWritePayload::from_bytes(payload_bytes).ok_or(EINVAL)?) in reg_write_payload()
621 Ok(*RegModifyPayload::from_bytes(payload_bytes).ok_or(EINVAL)?) in reg_modify_payload()
638 Ok(*RegPollPayload::from_bytes(payload_bytes).ok_or(EINVAL)?) in reg_poll_payload()
655 Ok(*DelayUsPayload::from_bytes(payload_bytes).ok_or(EINVAL)?) in delay_us_payload()
672 Ok(*RegStorePayload::from_bytes(payload_bytes).ok_or(EINVAL)?) in reg_store_payload()
H A Dsequencer.rs85 let fw_cmd = fw::SequencerBufferCmd::from_bytes(data).ok_or(EINVAL)?; in new()
/linux/scripts/gdb/linux/
H A Dpgtable.py88 data = int.from_bytes(
/linux/tools/testing/selftests/net/openvswitch/
H A Dovs-dpctl.py1052 lambda x: int.from_bytes(x, "big"),
1059 lambda x: int.from_bytes(x, "big"),
1321 lambda x: int.from_bytes(x, "big"),
1328 lambda x: int.from_bytes(x, "big"),
1365 ("sll", "sll", macstr, lambda x: int.from_bytes(x, "big")),
1366 ("tll", "tll", macstr, lambda x: int.from_bytes(x, "big")),
/linux/tools/testing/selftests/tpm2/
H A Dtpm2.py745 pcrSelect = int.from_bytes(pcrSelect, byteorder='big')