Home
last modified time | relevance | path

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

/system/security/keystore2/src/crypto/
Dzvec.rs113 fn try_from(v: &[u8]) -> Result<Self, Self::Error> { in try_from() method
125 fn try_from(mut v: Vec<u8>) -> Result<Self, Self::Error> { in try_from() method
Dlib.rs227 Ok(Password::Owned(ZVec::try_from(self.get_key())?)) in try_clone()
442 let negated_size = usize::try_from(-size).map_err(|_e| Error::ExtractSubjectFailed)?; in parse_subject_from_certificate()
462 let safe_size = usize::try_from(size).map_err(|_e| Error::ExtractSubjectFailed)?; in parse_subject_from_certificate()
/system/keymint/common/src/tag/
Dlegacy.rs312 let tag = <Tag>::try_from(tag_num) in deserialize()
318 KeyParam::Purpose(<KeyPurpose>::try_from(consume_i32(data)?).map_err(enum_err)?) in deserialize()
321 KeyParam::Algorithm(<Algorithm>::try_from(consume_i32(data)?).map_err(enum_err)?) in deserialize()
324 KeyParam::BlockMode(<BlockMode>::try_from(consume_i32(data)?).map_err(enum_err)?) in deserialize()
327 KeyParam::Digest(<Digest>::try_from(consume_i32(data)?).map_err(enum_err)?) in deserialize()
330 KeyParam::Padding(<PaddingMode>::try_from(consume_i32(data)?).map_err(enum_err)?) in deserialize()
333 KeyParam::EcCurve(<EcCurve>::try_from(consume_i32(data)?).map_err(enum_err)?) in deserialize()
336 <Digest>::try_from(consume_i32(data)?).map_err(enum_err)?, in deserialize()
339 KeyParam::Origin(<KeyOrigin>::try_from(consume_i32(data)?).map_err(enum_err)?) in deserialize()
/system/keymint/common/src/crypto/
Drsa.rs182 let key_info = pkcs8::PrivateKeyInfo::try_from(data) in import_pkcs8_key()
202 let parsed_key = pkcs1::RsaPrivateKey::try_from(private_key) in import_pkcs1_key()
Dec.rs90 fn try_from(curve: EcCurve) -> Result<NistCurve, Error> { in try_from() method
371 let key_info = pkcs8::PrivateKeyInfo::try_from(data) in import_pkcs8_key()
/system/keymint/boringssl/src/
Derr.rs27 ffi::ERR_LIB_USER => ErrorCode::try_from(reason).unwrap_or(ErrorCode::UnknownError), in map_openssl_err()
Dec.rs157 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.rs446 fn try_from(t: SystemTime) -> Result<Self, Self::Error> { in try_from() method
2095 private_key: ZVec::try_from(km_blob)?, in retrieve_attestation_key_and_cert_chain()
3340 params![DateTime::try_from(now)?, DateTime::try_from(then)?, DateTime::try_from(soon)?], in datetime()
3344 assert_eq!(DateTime::try_from(then)?, rows.next()?.unwrap().get(0)?); in datetime()
3345 assert_eq!(DateTime::try_from(now)?, rows.next()?.unwrap().get(0)?); in datetime()
3346 assert_eq!(DateTime::try_from(soon)?, rows.next()?.unwrap().get(0)?); in datetime()
3348 assert!(DateTime::try_from(then)? < DateTime::try_from(now)?); in datetime()
3349 assert!(DateTime::try_from(then)? < DateTime::try_from(soon)?); in datetime()
3350 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
Dsuper_key.rs215 let key = ZVec::try_from(km_dev.use_key_in_one_step( in decrypt()
Dlegacy_blob.rs1631 value: BlobValue::Decrypted(ZVec::try_from(data).unwrap()), in make_encrypted_key_file()
/system/keymint/wire/src/
Dlegacy.rs240 ErrorCode::try_from(error_code as i32).map_err(|_e| Error::InvalidEnumValue(error_code)) in deserialize_trusty_rsp_error_code()
349 Ok((Self::try_from(v as i32).map_err(|_e| Error::InvalidEnumValue(v))?, rest)) in deserialize()
359 Ok((Self::try_from(v as i32).map_err(|_e| Error::InvalidEnumValue(v))?, rest)) in deserialize()
369 Ok((Self::try_from(v as i32).map_err(|_e| Error::InvalidEnumValue(v))?, rest)) in deserialize()
Dlib.rs36 fn try_from(value: i32) -> Result<Self, Self::Error> {
Dkeymint.rs55 fn try_from(v: i32) -> Result<Self, Self::Error> { in try_from() method
/system/security/keystore2/src/fuzzers/
Dkeystore2_unsafe_fuzzer.rs137 let _res = ZVec::try_from(vector_data);
/system/keymint/ta/src/
Dcert.rs167 let duration = Duration::from_secs(u64::try_from(secs_since_epoch).map_err(dt_err)?); in validity_time_from_datetime()
309 let sec_level = SecurityLevel::try_from(security_level as u32) in attestation_extension()
Dkeys.rs632 KeyFormat::try_from(secure_key_wrapper.key_description.key_format).map_err(|_e| { in import_wrapped_key()
Dlib.rs630 let verified_boot_state = match VerifiedBootState::try_from(req.verified_boot_state) in process_req()
/system/keymint/hal/src/
Dhal.rs710 Self::try_from(val.0)