/system/tools/mkbootimg/rust/ |
D | bootimg.rs | 192 magic: BOOT_MAGIC[0..MAGIC_SIZE].try_into().unwrap(), in buffer_too_small_valid_version() 216 magic: BOOT_MAGIC[0..MAGIC_SIZE].try_into().unwrap(), in bad_version() 230 magic: BOOT_MAGIC[0..MAGIC_SIZE].try_into().unwrap(), in parse_v0() 247 magic: BOOT_MAGIC[0..MAGIC_SIZE].try_into().unwrap(), in parse_v1() 267 magic: BOOT_MAGIC[0..MAGIC_SIZE].try_into().unwrap(), in parse_v2() 287 magic: BOOT_MAGIC[0..MAGIC_SIZE].try_into().unwrap(), in parse_v3() 304 magic: BOOT_MAGIC[0..MAGIC_SIZE].try_into().unwrap(), in parse_v4() 338 magic: VENDOR_BOOT_MAGIC[0..VENDOR_MAGIC_SIZE].try_into().unwrap(), in vendor_bad_version() 352 magic: VENDOR_BOOT_MAGIC[0..VENDOR_MAGIC_SIZE].try_into().unwrap(), in vendor_buffer_too_small_valid_version() 369 magic: VENDOR_BOOT_MAGIC[0..VENDOR_MAGIC_SIZE].try_into().unwrap(), in vendor_parse_v3() [all …]
|
/system/nfc/tools/casimir/src/ |
D | controller.rs | 319 self.total_duration = u16::from_le_bytes(value.try_into()?); in set() 323 self.con_discovery_param = u8::from_le_bytes(value.try_into()?); in set() 327 self.power_state = u8::from_le_bytes(value.try_into()?); in set() 331 self.pa_bail_out = u8::from_le_bytes(value.try_into()?); in set() 335 self.pa_devices_limit = u8::from_le_bytes(value.try_into()?); in set() 339 self.pb_afi = u8::from_le_bytes(value.try_into()?); in set() 343 self.pb_bail_out = u8::from_le_bytes(value.try_into()?); in set() 347 self.pb_attrib_param1 = u8::from_le_bytes(value.try_into()?); in set() 351 self.pb_sensb_req_param = u8::from_le_bytes(value.try_into()?); in set() 355 self.pb_devices_limit = u8::from_le_bytes(value.try_into()?); in set() [all …]
|
/system/keymint/common/src/crypto/ |
D | aes.rs | 57 16 => Ok(Key::Aes128(data.try_into().unwrap())), // safe: len checked in new() 58 24 => Ok(Key::Aes192(data.try_into().unwrap())), // safe: len checked in new() 59 32 => Ok(Key::Aes256(data.try_into().unwrap())), // safe: len checked in new() 149 nonce(BLOCK_SIZE, caller_nonce, rng)?.try_into().map_err(|_e| { in new() 169 nonce(BLOCK_SIZE, caller_nonce, rng)?.try_into().map_err(|_e| { in new() 182 .try_into() in new()
|
D | des.rs | 47 .try_into() in new() 54 .try_into() in new_from() 104 .try_into() in new()
|
/system/security/keystore2/tests/ |
D | keystore2_client_grant_key_tests.rs | 97 grantee_uid.try_into().unwrap(), in keystore2_grant_key_with_invalid_perm_expecting_syserror() 123 GRANTEE_UID.try_into().unwrap(), in keystore2_grant_key_with_perm_none() 179 GRANTEE_UID.try_into().unwrap(), in keystore2_grant_get_info_use_key_perm() 268 vec![GRANTEE_UID.try_into().unwrap()], in keystore2_grant_delete_key_success() 346 vec![GRANTEE_UID.try_into().unwrap()], in keystore2_grant_key_fails_with_permission_denied() 377 SEC_GRANTEE_UID.try_into().unwrap(), in keystore2_grant_key_fails_with_permission_denied() 426 vec![grantee_uid.try_into().unwrap()], in keystore2_grant_key_fails_with_grant_perm_expect_perm_denied() 451 grantee_uid.try_into().unwrap(), in keystore2_grant_fails_with_non_existing_key_expect_key_not_found_err() 481 vec![GRANTEE_UID.try_into().unwrap()], in keystore2_ungrant_key_success() 497 GRANTEE_UID.try_into().unwrap(), in keystore2_ungrant_key_success() [all …]
|
D | keystore2_client_authorizations_tests.rs | 172 .active_date_time(active_datetime.try_into().unwrap()); in keystore2_gen_key_auth_active_datetime_test_success() 204 .active_date_time(future_active_datetime.try_into().unwrap()); in keystore2_gen_key_auth_future_active_datetime_test_op_fail() 236 .origination_expire_date_time(origination_expire_datetime.try_into().unwrap()); in keystore2_gen_key_auth_future_origination_expire_datetime_test_success() 268 .origination_expire_date_time(origination_expire_datetime.try_into().unwrap()); in keystore2_gen_key_auth_origination_expire_datetime_test_op_fail() 300 .usage_expire_date_time(usage_expire_datetime.try_into().unwrap()); in keystore2_gen_key_auth_future_usage_expire_datetime_hmac_verify_op_success() 328 .usage_expire_date_time(usage_expire_datetime.try_into().unwrap()); in keystore2_gen_key_auth_usage_expire_datetime_hmac_verify_op_fail() 365 .usage_expire_date_time(usage_expire_datetime.try_into().unwrap()); in keystore2_gen_key_auth_usage_future_expire_datetime_decrypt_op_success() 415 .usage_expire_date_time(usage_expire_datetime.try_into().unwrap()); in keystore2_gen_key_auth_usage_expire_datetime_decrypt_op_fail() 626 .creation_date_time(creation_datetime.try_into().unwrap()); in keystore2_gen_key_auth_creation_date_time_test_fail_with_invalid_arg_error()
|
/system/security/mls/mls-rs-crypto-boringssl/src/ |
D | aead.rs | 109 let nonce_array = nonce[..self.nonce_size()].try_into()?; in seal() 113 let cipher = Aes128Gcm::new(key[..self.key_size()].try_into()?); in seal() 117 let cipher = Aes256Gcm::new(key[..self.key_size()].try_into()?); in seal() 121 let cipher = Chacha20Poly1305::new(key[..self.key_size()].try_into()?); in seal() 151 let nonce_array = nonce[..self.nonce_size()].try_into()?; in open() 155 let cipher = Aes128Gcm::new(key[..self.key_size()].try_into()?); in open() 161 let cipher = Aes256Gcm::new(key[..self.key_size()].try_into()?); in open() 167 let cipher = Chacha20Poly1305::new(key[..self.key_size()].try_into()?); in open()
|
D | eddsa.rs | 108 ed25519::PrivateKey::from_seed(secret_key[..ed25519::SEED_LEN].try_into()?); in signature_key_derive_public() 129 ed25519::PrivateKey::from_seed(secret_key[..ed25519::SEED_LEN].try_into()?); in sign() 157 public_key.as_bytes()[..ed25519::PUBLIC_KEY_LEN].try_into()?, in verify() 159 match public_key.verify(data, signature[..ed25519::SIGNATURE_LEN].try_into()?) { in verify()
|
D | test_helpers.rs | 21 .try_into()
|
D | ecdh.rs | 99 let private_key = x25519::PrivateKey(secret_key[..x25519::PRIVATE_KEY_LEN].try_into()?); in dh() 100 match private_key.compute_shared_key(public_key[..x25519::PUBLIC_KEY_LEN].try_into()?) { in dh() 117 let private_key = x25519::PrivateKey(secret_key[..x25519::PRIVATE_KEY_LEN].try_into()?); in to_public()
|
/system/secretkeeper/comm/src/data_types/ |
D | request_response_impl.rs | 79 let version: u64 = value_to_integer(&res[1])?.try_into()?; in new() 103 let [id, secret, sealing_policy] = args.try_into().map_err(|_| Error::RequestMalformed)?; in new() 145 let [id, sealing_policy] = args.try_into().map_err(|_| Error::RequestMalformed)?; in new() 168 let [error_code, secret] = res.try_into().map_err(|_| Error::ResponseMalformed)?; in new()
|
D | packet.rs | 54 let num: u16 = value_to_integer(&self.0[0])?.try_into()?; in opcode() 96 let error_code: u16 = value_to_integer(&self.0[0])?.try_into()?; in response_type()
|
D | mod.rs | 50 .try_into() in from_cbor_value() 78 .try_into() in from_cbor_value()
|
D | error.rs | 58 let error_code: u16 = value_to_integer(&response_cbor[0])?.try_into()?; in new()
|
/system/security/keystore2/src/ |
D | id_rotation.rs | 72 .checked_add(ID_ROTATION_PERIOD * temporal_counter_value.try_into()?) in had_factory_reset_since_id_rotation() 165 let mtime = TimeVal::seconds((ID_ROTATION_PERIOD.as_secs() * 10).try_into().unwrap()); in test_existing_timestamp() 166 let atime = TimeVal::seconds((ID_ROTATION_PERIOD.as_secs() * 10).try_into().unwrap()); in test_existing_timestamp()
|
/system/extras/simpleperf/rust/ |
D | lib.rs | 51 let arg_count: i32 = pointer_args.len().try_into().unwrap(); in run_record_cmd() 60 let arg_count: i32 = pointer_args.len().try_into().unwrap(); in run_inject_cmd()
|
/system/secretkeeper/core/src/ta/ |
D | bootloader.rs | 58 let opcode = u32::from_be_bytes(opcode.try_into().unwrap()); in from_slice() 128 let opcode = u32::from_be_bytes(opcode.try_into().unwrap()); in from_slice() 137 match u32::from_be_bytes(errcode.try_into().unwrap()) { in from_slice()
|
/system/libfmq/tests/aidl/default/ |
D | TestAidlMsgQ.rs | 72 let rc = mq.read_many(count.try_into().unwrap()); in requestReadFmqSync() 100 let wc = mq.write_many(count.try_into().unwrap()); in requestWriteFmqSync()
|
/system/core/libstats/pull_rust/ |
D | stats_pull.rs | 77 additive_fields.len().try_into().expect("Cannot convert length to i32"), in set_additive_fields() 88 .try_into() in get_additive_fields()
|
/system/secretkeeper/dice_policy/src/ |
D | lib.rs | 109 .try_into() in from_cbor_value() 112 .try_into() in from_cbor_value() 178 let version: u64 = version.try_into().map_err(|_| UnexpectedItem("-", "u64"))?; in from_cbor_value() 362 .try_into() in value_to_integer()
|
/system/authgraph/tests/src/ |
D | lib.rs | 77 let key = HmacKey(key.try_into().unwrap()); in test_hmac() 248 let key = AesKey(hex::decode(test.key).unwrap().try_into().unwrap()); in test_aes_gcm() 249 let nonce = Nonce12(hex::decode(test.iv).unwrap().try_into().unwrap()); in test_aes_gcm() 369 .try_into() in test_ed25519_round_trip() 900 pvt_key.as_array()[0..CURVE25519_PRIV_KEY_LEN].try_into().map_err(|e| { in create_identity() 961 pvt_key.as_array()[0..CURVE25519_PRIV_KEY_LEN].try_into().map_err(|e| { in create_identity() 1030 pvt_key.as_array()[0..CURVE25519_PRIV_KEY_LEN].try_into().map_err(|e| { in create_identity() 1093 pvt_key.as_array()[0..CURVE25519_PRIV_KEY_LEN].try_into().map_err(|e| { in create_identity() 1157 pvt_key.as_array()[0..CURVE25519_PRIV_KEY_LEN].try_into().map_err(|e| { in create_identity() 1222 pvt_key.as_array()[0..CURVE25519_PRIV_KEY_LEN].try_into().map_err(|e| { in create_identity()
|
/system/authgraph/wire/src/ |
D | cbor.rs | 159 results.try_into().map_err(|_e| CborError::UnexpectedItem("arr other len", "arr fixed len")) in from_cbor_value() 182 Value::Integer(i) => i.try_into().map_err(|_| CborError::OutOfRangeIntegerValue), in from_cbor_value()
|
/system/keymint/ta/src/ |
D | keys.rs | 574 aes::Key::Aes256(unmasked_transport_key.try_into().map_err(|_e| { in import_wrapped_key() 595 nonce: secure_key_wrapper.initialization_vector.try_into() in import_wrapped_key() 599 nonce: secure_key_wrapper.initialization_vector.try_into() in import_wrapped_key() 603 nonce: secure_key_wrapper.initialization_vector.try_into() in import_wrapped_key() 607 nonce: secure_key_wrapper.initialization_vector.try_into() in import_wrapped_key() 611 nonce: secure_key_wrapper.initialization_vector.try_into() in import_wrapped_key()
|
/system/authgraph/core/src/ |
D | key.rs | 493 Value::Integer(i) => i.try_into()?, in from_cbor_value() 622 Value::Integer(i) => i.try_into()?, in from_cbor_value() 690 .try_into() in from_cbor_value() 756 .try_into() in from_cbor_value() 931 .try_into() in from_cbor_value() 943 Some(ComponentVersion::IntVersion(comp_version.try_into().map_err( in from_cbor_value() 952 Some(security_version.try_into().map_err(|_| { in from_cbor_value()
|
/system/libfmq/tests/ |
D | msgq_rust_test_client.rs | 32 let page_size: usize = unsafe { libc::sysconf(libc::_SC_PAGESIZE) }.try_into().unwrap(); in setup_test_service()
|