Searched refs:try_into (Results 1 – 14 of 14) sorted by relevance
/trusty/user/app/storage/test/storage-unittest-aidl/unittests/ |
D | helpers.rs | 60 let mut pattern: u32 = (offset / U32_SIZE).try_into().unwrap(); in check_pattern32() 85 let mut pattern: u32 = (offset / U32_SIZE).try_into().unwrap(); in fill_pattern32() 116 .write(chunk_offset.try_into().unwrap(), &buf) in write_pattern() 118 if written != chunk_len.try_into().unwrap() { in write_pattern() 140 .read(chunk_len.try_into().unwrap(), chunk_offset.try_into().unwrap()) in read_pattern()
|
/trusty/user/app/sample/hwcryptohal/server/ |
D | helpers.rs | 50 let value: i64 = value.try_into()?; 51 Ok(value.try_into().map_err(|_| coset::CoseError::EncodeFailed)?)
|
D | service_encryption_key.rs | 85 .protected(self.try_into()?) in encrypt_content_service_encryption_key() 112 let encryption_header: EncryptionHeader = (&context.protected).try_into()?; in decrypt_content_service_encryption_key() 164 .try_into() in try_from() 232 raw_key.try_into().expect("should not fail, call with SERVICE_KEK_LENGTH returns 32 bytes"), in derive_key_hkdf() 262 Ok(value_bytes.as_slice().try_into().expect("Shouldn't fail, we checked size already")) 274 integer_value.try_into().map_err(|e| { in parse_cborium_u32()
|
D | hwcrypto_device_key.rs | 167 match key.try_into().map_err(|_| CoseError::EncodeFailed)? { in from_cbor_value() 179 .try_into() in from_cbor_value() 322 .try_into()?; in deriveKey() 334 let key_size = clear_policy.keySizeBytes.try_into().map_err(|_| { in deriveKey()
|
D | opaque_key.rs | 157 binder.try_into().expect("because binder is local this should not fail"); in try_from() 486 .try_into() in key_vec_to_array() 554 kmr_wire::KeySizeInBits((key_size_bytes * 8).try_into().map_err(|_| { in generate_key_material()
|
/trusty/user/base/lib/tipc/rust/src/ |
D | handle.rs | 92 rc.try_into().map(Handle).or(Err(TipcError::InvalidHandle)) in connect() 101 Self::from_raw(rc.try_into().or(Err(TipcError::InvalidHandle))?) in try_clone() 170 num_iov: iovs.len().try_into()?, in recv_vectored() 173 num_handles: raw_handles.len().try_into()?, in recv_vectored() 189 Ok((rc.try_into()?, msg_info.num_handles.try_into()?)) in recv_vectored() 221 num_iov: iovs.len().try_into()?, in send_vectored() 224 num_handles: handles.len().try_into()?, in send_vectored() 351 let page_size: usize = page_size.try_into().unwrap(); in mmap()
|
D | service.rs | 261 let bytes: &[u8; Self::UUID_BYTE_LEN] = bytes.try_into().or(Err(TipcError::OutOfBounds))?; in try_from_bytes() 1036 .try_into() in new_with_dispatcher() 1380 Ok(i32::from_ne_bytes(bytes[0..4].try_into().map_err(|_| TipcError::OutOfBounds)?)) in deserialize()
|
/trusty/user/app/sample/rust-hello-world/ |
D | lib.rs | 147 length: outputmsg.len().try_into().map_err(|e| { in on_message() 223 length: inputstring.len().try_into().unwrap(), in hello_world_test()
|
/trusty/user/base/lib/hwkey/rust/src/ |
D | lib.rs | 204 let os_rollback_version: i32 = args.os_rollback_version.try_into()?; in derive() 323 fn try_into(self) -> Result<i32, HwkeyError> { in try_into() method 326 OsRollbackVersion::Version(version) => Ok(version.try_into()?), in try_into() 337 n => Ok(OsRollbackVersion::Version(n.try_into()?)), in try_from()
|
/trusty/user/base/lib/storage/rust/src/ |
D | lib.rs | 207 Ok(Self { raw: handle.try_into().unwrap() }) in new() 385 offset.try_into().unwrap(), in read_at() 463 offset.try_into().unwrap(), in write_at_impl()
|
/trusty/user/base/lib/hwwsk/rust/src/ |
D | lib.rs | 230 let status = u32::from_ne_bytes(status_bytes.try_into()?); in deserialize() 231 let cmd = u32::from_ne_bytes(cmd_bytes.try_into()?); in deserialize()
|
/trusty/user/base/lib/system_state/rust/src/ |
D | lib.rs | 203 Ok(Self { flag: payload.flag.try_into()?, value: payload.value }) in deserialize()
|
/trusty/user/app/keymint/keys/ |
D | legacy.rs | 83 raw_key.try_into().map_err(|_e| km_err!(UnknownError, "unexpected HKDF output len"))?, in derive_kek() 172 .try_into() in convert_key()
|
/trusty/user/app/keymint/ |
D | keys.rs | 47 let u32_bytes: [u8; U32_SIZE] = match bytes.try_into() { in deserialize_u32()
|