Home
last modified time | relevance | path

Searched refs:try_from (Results 1 – 25 of 28) sorted by relevance

12

/system/nfc/tools/casimir/src/
Dpackets.rs29 ConnId::try_from(id as u8 + 2).unwrap() in from_dynamic()
41 RfDiscoveryId::try_from(0).unwrap() in reserved()
47 RfDiscoveryId::try_from(id as u8 + 1).unwrap() in from_index()
58 NfceeId::try_from(id).unwrap() in nfcee()
62 NfceeId::try_from(id).unwrap() in hci_nfcee()
214 fn try_from(protocol: nci::RfTechnologyAndMode) -> Result<Self, Self::Error> { in try_from() method
/system/security/keystore2/src/crypto/
Dzvec.rs118 fn try_from(v: &[u8]) -> Result<Self, Self::Error> { in try_from() method
130 fn try_from(mut v: Vec<u8>) -> Result<Self, Self::Error> { in try_from() method
Dlib.rs239 Ok(Password::Owned(ZVec::try_from(self.get_key())?)) in try_clone()
454 let negated_size = usize::try_from(-size).map_err(|_e| Error::ExtractSubjectFailed)?; in parse_subject_from_certificate()
474 let safe_size = usize::try_from(size).map_err(|_e| Error::ExtractSubjectFailed)?; in parse_subject_from_certificate()
/system/keymint/common/src/tag/
Dlegacy.rs322 let tag = <Tag>::try_from(tag_num) in deserialize()
328 KeyParam::Purpose(<KeyPurpose>::try_from(consume_i32(data)?).map_err(enum_err)?) in deserialize()
331 KeyParam::Algorithm(<Algorithm>::try_from(consume_i32(data)?).map_err(enum_err)?) in deserialize()
334 KeyParam::BlockMode(<BlockMode>::try_from(consume_i32(data)?).map_err(enum_err)?) in deserialize()
337 KeyParam::Digest(<Digest>::try_from(consume_i32(data)?).map_err(enum_err)?) in deserialize()
340 KeyParam::Padding(<PaddingMode>::try_from(consume_i32(data)?).map_err(enum_err)?) in deserialize()
343 KeyParam::EcCurve(<EcCurve>::try_from(consume_i32(data)?).map_err(enum_err)?) in deserialize()
346 <Digest>::try_from(consume_i32(data)?).map_err(enum_err)?, in deserialize()
349 KeyParam::Origin(<KeyOrigin>::try_from(consume_i32(data)?).map_err(enum_err)?) in deserialize()
/system/keymint/common/src/crypto/
Drsa.rs211 let key_info = pkcs8::PrivateKeyInfo::try_from(data) in import_pkcs8_key()
231 let parsed_key = pkcs1::RsaPrivateKey::try_from(private_key) in import_pkcs1_key()
Dec.rs108 fn try_from(curve: EcCurve) -> Result<NistCurve, Error> { in try_from() method
400 let key_info = pkcs8::PrivateKeyInfo::try_from(data) in import_pkcs8_key()
509 let nist_curve = NistCurve::try_from(curve)?; in to_cose_signature()
532 let nist_curve = NistCurve::try_from(curve)?; in from_cose_signature()
/system/secretkeeper/core/src/
Dcipher.rs33 let nonce12 = Nonce12::try_from(&encrypt0.unprotected.iv[..]) in decrypt_message()
/system/keymint/boringssl/src/
Derr.rs40 ffi::ERR_LIB_USER => ErrorCode::try_from(reason).unwrap_or(ErrorCode::BoringSslError), in map_openssl_err()
Dec.rs173 let curve = ec::NistCurve::try_from(curve)?; in begin_sign()
/system/security/keystore2/src/
Dboot_level_keys.rs178 ZVec::try_from(level_zero_key).context(ks_err!("conversion to ZVec failed"))?; in get_level_zero_key()
299 let mut blkc = BootLevelKeyCache::new(ZVec::try_from(initial_key as &[u8])?); in test_output_is_consistent()
Ddatabase.rs478 fn try_from(t: SystemTime) -> Result<Self, Self::Error> { in try_from() method
2960 params![DateTime::try_from(now)?, DateTime::try_from(then)?, DateTime::try_from(soon)?], in datetime()
2964 assert_eq!(DateTime::try_from(then)?, rows.next()?.unwrap().get(0)?); in datetime()
2965 assert_eq!(DateTime::try_from(now)?, rows.next()?.unwrap().get(0)?); in datetime()
2966 assert_eq!(DateTime::try_from(soon)?, rows.next()?.unwrap().get(0)?); in datetime()
2968 assert!(DateTime::try_from(then)? < DateTime::try_from(now)?); in datetime()
2969 assert!(DateTime::try_from(then)? < DateTime::try_from(soon)?); in datetime()
2970 assert!(DateTime::try_from(now)? < DateTime::try_from(soon)?); in datetime()
Dkey_parameter.rs223 fn try_from(p: Primitive) -> Result<i64, Self::Error> { in try_from() method
233 fn try_from(p: Primitive) -> Result<i32, Self::Error> { in try_from() method
243 fn try_from(p: Primitive) -> Result<Vec<u8>, Self::Error> { in try_from() method
/system/keymint/wire/src/
Dlegacy.rs254 ErrorCode::try_from(error_code as i32).map_err(|_e| Error::InvalidEnumValue(error_code)) in deserialize_trusty_rsp_error_code()
363 Ok((Self::try_from(v as i32).map_err(|_e| Error::InvalidEnumValue(v))?, rest)) in deserialize()
373 Ok((Self::try_from(v as i32).map_err(|_e| Error::InvalidEnumValue(v))?, rest)) in deserialize()
383 Ok((Self::try_from(v as i32).map_err(|_e| Error::InvalidEnumValue(v))?, rest)) in deserialize()
Dlib.rs54 fn try_from(value: i32) -> Result<Self, Self::Error> {
Dkeymint.rs75 fn try_from(v: i32) -> Result<Self, Self::Error> { in try_from() method
/system/secretkeeper/hal/src/
Dlib.rs82 .map(|id| SecretId::try_from(id.id.as_slice())) in deleteIds()
/system/secretkeeper/comm/src/
Dwire.rs89 Value::Bytes(b) => SecretId::try_from(b.as_slice()) in from_cbor_value()
/system/security/keystore2/src/fuzzers/
Dkeystore2_unsafe_fuzzer.rs132 let _res = ZVec::try_from(vector_data);
/system/nfc/src/rust/nci/
Dapi.rs299 let dt = DestTypes::try_from(dest_type).unwrap(); in nfc_conn_create()
/system/authgraph/core/src/
Dkey.rs81 fn try_from(payload: arc::ArcPayload) -> Result<AesKey, Self::Error> { in try_from() method
147 fn try_from(v: &[u8]) -> Result<Self, Self::Error> { in try_from() method
Dkeyexchange.rs569 let key = AesKey::try_from(arc_content.payload)?; in decipher_shared_keys_from_arcs()
/system/keymint/ta/src/
Dkeys.rs678 KeyFormat::try_from(secure_key_wrapper.key_description.key_format).map_err(|_e| { in import_wrapped_key()
Dcert.rs188 let duration = Duration::from_secs(u64::try_from(secs_since_epoch).map_err(dt_err)?); in validity_time_from_datetime()
340 let sec_level = SecurityLevel::try_from(security_level as u32) in attestation_extension()
Dlib.rs684 let verified_boot_state = match VerifiedBootState::try_from(req.verified_boot_state) in process_req()
/system/keymint/hal/src/
Dhal.rs750 Self::try_from(val.0)

12