Home
last modified time | relevance | path

Searched refs:Value (Results 1 – 25 of 96) sorted by relevance

1234

/system/keymint/hal/src/hal/
Dtests.rs15 use crate::cbor::value::Value;
60 (Value::Map(vec![]), "expected arr"), in test_cbor_parse_fail()
61 (Value::Integer(0.into()), "expected arr"), in test_cbor_parse_fail()
62 (Value::Array(vec![]), "expected arr len 3"), in test_cbor_parse_fail()
64 Value::Array(vec![ in test_cbor_parse_fail()
65 Value::Integer(0.into()), in test_cbor_parse_fail()
66 Value::Integer(0.into()), in test_cbor_parse_fail()
67 Value::Integer(0.into()), in test_cbor_parse_fail()
68 Value::Integer(0.into()), in test_cbor_parse_fail()
73 Value::Array(vec![ in test_cbor_parse_fail()
[all …]
/system/chre/util/tests/
Dunique_ptr_test.cc29 struct Value { struct
30 Value(int value) : value(value) { in Value() function
34 ~Value() { in ~Value() argument
38 Value &operator=(Value &&other) { in operator =() argument
47 int Value::constructionCounter = 0; argument
69 UniquePtr<Value> myInt = MakeUnique<Value>(0xcafe); in TEST()
124 UniquePtr<Value> myInt = MakeUnique<Value>(0xcafe); in TEST()
126 Value *value = myInt.get(); in TEST()
128 UniquePtr<Value> moved(std::move(myInt)); in TEST()
134 Value::constructionCounter = 0; in TEST()
[all …]
/system/secretkeeper/comm/src/
Dwire.rs23 use ciborium::value::Value;
52 fn to_cbor_value(self) -> Result<Value, CoseError> { in to_cbor_value() argument
53 Ok(Value::Array(match self { in to_cbor_value()
55 vec![OpCode::SecretManagement.to_cbor_value()?, Value::Bytes(encrypt0)] in to_cbor_value()
60 Value::Array( in to_cbor_value()
61 ids.into_iter().map(|id| Value::Bytes(id.to_vec())).collect::<Vec<Value>>(), in to_cbor_value()
65 Self::DeleteAll => vec![OpCode::DeleteAll.to_cbor_value()?, Value::Null], in to_cbor_value()
69 fn from_cbor_value(value: Value) -> Result<Self, CoseError> { in from_cbor_value()
71 Value::Array(a) if a.len() == 2 => a, in from_cbor_value()
78 Value::Bytes(b) => b, in from_cbor_value()
[all …]
/system/authgraph/wire/src/
Dcbor.rs18 use ciborium::value::Value;
80 pub fn cbor_type_error<T>(value: &Value, want: &'static str) -> Result<T, CborError> { in cbor_type_error() argument
82 Value::Integer(_) => "int", in cbor_type_error()
83 Value::Bytes(_) => "bstr", in cbor_type_error()
84 Value::Text(_) => "tstr", in cbor_type_error()
85 Value::Array(_) => "array", in cbor_type_error()
86 Value::Map(_) => "map", in cbor_type_error()
87 Value::Tag(_, _) => "tag", in cbor_type_error()
88 Value::Float(_) => "float", in cbor_type_error()
89 Value::Bool(_) => "bool", in cbor_type_error()
[all …]
/system/secretkeeper/dice_policy/src/
Dlib.rs60 use ciborium::Value;
90 pub struct Constraint(u16, Vec<i64>, Value);
94 pub fn new(constraint_type: u16, path: Vec<i64>, value: Value) -> Result<Self, Error> { in new()
105 fn from_cbor_value(value: Value) -> Result<Self, CoseError> { in from_cbor_value()
123 fn to_cbor_value(self) -> Result<Value, CoseError> { in to_cbor_value() argument
124 Ok(Value::Array(vec![ in to_cbor_value()
125 Value::from(self.0), in to_cbor_value()
126 Value::Array(self.1.into_iter().map(Value::from).collect()), in to_cbor_value()
138 fn from_cbor_value(value: Value) -> Result<Self, CoseError> { in from_cbor_value()
151 fn to_cbor_value(self) -> Result<Value, CoseError> { in to_cbor_value() argument
[all …]
/system/core/fs_mgr/liblp/fuzzer/
DREADME.md30 | Parameter| Valid Values| Configured Value|
32 …,<br/> 4.`LP_PARTITION_ATTR_UPDATED`,<br/> 5.`LP_PARTITION_ATTR_DISABLED`|Value obtained from Fuzz…
33 |`blockDevSize`| Integer value from `0` to `100000`|Value obtained from FuzzedDataProvider|
34 |`metadataMaxSize`| Integer value from `0` to `10000` |Value obtained from FuzzedDataProvider|
35 |`metadataSlotCount`| Integer value from `0` to `2` |Value obtained from FuzzedDataProvider|
36 |`partitionName`| String |Value obtained from FuzzedDataProvider|
37 |`superBlockDeviceName`| String |Value obtained from FuzzedDataProvider|
38 |`blockDeviceInfoSize`| Integer |Value obtained from FuzzedDataProvider|
39 |`alignment`| Integer |Value obtained from FuzzedDataProvider|
40 |`alignmentOffset`| Integer |Value obtained from FuzzedDataProvider|
[all …]
/system/secretkeeper/comm/tests/
Ddata_types.rs19 use ciborium::Value;
109 Value::Bytes(ex_id_bytes()), in request_creation()
110 Value::Bytes(ex_secret_bytes()), in request_creation()
111 Value::Bytes(ex_dice_policy()), in request_creation()
120 *Request::new(vec![Value::Bytes(ex_id_bytes()), Value::Bytes(ex_dice_policy())]).unwrap(); in request_creation()
126 *Request::new(vec![Value::Bytes(ex_id_bytes()), Value::Null]).unwrap(); in request_creation()
135 *Response::new(vec![Value::from(ERROR_OK), Value::from(5)]).unwrap(); in response_creation()
139 let _ = *<StoreSecretResponse as Response>::new(vec![Value::from(ERROR_OK)]).unwrap(); in response_creation()
143 Value::from(ERROR_OK), in response_creation()
144 Value::Bytes(ex_secret_bytes()), in response_creation()
[all …]
/system/keymint/wire/src/
Dlib.rs281 pub fn cbor_type_error<T>(value: &cbor::value::Value, want: &'static str) -> Result<T, CborError> { in cbor_type_error() argument
282 use cbor::value::Value; in cbor_type_error()
284 Value::Integer(_) => "int", in cbor_type_error()
285 Value::Bytes(_) => "bstr", in cbor_type_error()
286 Value::Text(_) => "tstr", in cbor_type_error()
287 Value::Array(_) => "array", in cbor_type_error()
288 Value::Map(_) => "map", in cbor_type_error()
289 Value::Tag(_, _) => "tag", in cbor_type_error()
290 Value::Float(_) => "float", in cbor_type_error()
291 Value::Bool(_) => "bool", in cbor_type_error()
[all …]
Dtests.rs16 use crate::cbor::value::Value;
22 ("01", Value::Integer(1.into())), in test_read_to_value_ok()
23 ("40", Value::Bytes(vec![])), in test_read_to_value_ok()
24 ("60", Value::Text(String::new())), in test_read_to_value_ok()
/system/secretkeeper/comm/src/data_types/
Dpacket.rs19 use ciborium::Value;
34 pub struct RequestPacket(Vec<Value>);
38 pub fn from(request_cbor: Vec<Value>) -> Self { in from()
44 pub fn into_inner(self) -> Vec<Value> { in into_inner() argument
61 fn from_cbor_value(value: Value) -> Result<Self, CoseError> { in from_cbor_value()
65 fn to_cbor_value(self) -> Result<Value, CoseError> { in to_cbor_value() argument
66 Ok(Value::Array(self.0)) in to_cbor_value()
77 pub struct ResponsePacket(Vec<Value>);
81 pub fn from(response_cbor: Vec<Value>) -> Self { in from()
87 pub fn into_inner(self) -> Vec<Value> { in into_inner() argument
[all …]
Drequest_response_impl.rs31 use ciborium::Value;
55 fn new(args: Vec<Value>) -> Result<Box<Self>, Error> { in new()
62 fn args(&self) -> Vec<Value> { in args() argument
75 fn new(res: Vec<Value>) -> Result<Box<Self>, Error> { in new()
83 fn result(&self) -> Vec<Value> { in result() argument
102 fn new(args: Vec<Value>) -> Result<Box<Self>, Error> { in new()
110 fn args(&self) -> Vec<Value> { in args() argument
112 Value::from(self.id.0.as_slice()), in args()
113 Value::from(self.secret.0.as_slice()), in args()
114 Value::from(self.sealing_policy.clone()), in args()
[all …]
Dmod.rs30 use ciborium::Value;
45 fn from_cbor_value(value: Value) -> Result<Self, CoseError> { in from_cbor_value()
55 fn to_cbor_value(self) -> Result<Value, CoseError> { in to_cbor_value() argument
56 Ok(Value::Bytes(self.0.to_vec())) in to_cbor_value()
73 fn from_cbor_value(value: Value) -> Result<Self, CoseError> { in from_cbor_value()
83 fn to_cbor_value(self) -> Result<Value, CoseError> { in to_cbor_value() argument
84 Ok(Value::Bytes(self.0.to_vec())) in to_cbor_value()
109 let enc = Value::Integer(self.0.into()).to_vec().map_err(|_| Error::ConversionError)?; in get_then_increment()
Drequest.rs24 use ciborium::Value;
41 fn new(args: Vec<Value>) -> Result<Box<Self>, Error>; in new()
44 fn args(&self) -> Vec<Value>; in args() argument
55 res.insert(0, Value::from(Self::OPCODE as u16)); in serialize_to_packet()
62 if req.first() != Some(&Value::from(Self::OPCODE as u16)) { in deserialize_from_packet()
Dresponse.rs23 use ciborium::Value;
47 fn new(response_cbor: Vec<Value>) -> Result<Box<Self>, Error>; in new()
51 fn result(&self) -> Vec<Value> { in result() argument
64 res.insert(0, Value::from(self.error_code())); in serialize_to_packet()
/system/authgraph/core/src/
Dkey.rs29 cbor, cbor::value::Value, iana, AsCborValue, CborOrdering, CborSerializable, CoseError,
335 pub full_map: Option<Value>,
366 pub custom_fields: Vec<(i64, Value)>,
383 pub custom_fields: Vec<(i64, Value)>,
478 fn from_cbor_value(value: Value) -> Result<Self, CoseError> { in from_cbor_value()
480 Value::Array(a) if a.len() == 3 || a.len() == 2 => a, in from_cbor_value()
487 Value::Bytes(cert_chain_encoded) => CertChain::from_slice(&cert_chain_encoded)?, in from_cbor_value()
493 Value::Integer(i) => i.try_into()?, in from_cbor_value()
501 fn to_cbor_value(self) -> Result<Value, CoseError> { in to_cbor_value() argument
502 let mut array = Vec::<Value>::new(); in to_cbor_value()
[all …]
Darc.rs29 cbor::value::Value, iana, AsCborValue, CborSerializable, CoseEncrypt0, CoseEncrypt0Builder,
83 pub protected_headers: Vec<(Label, Value)>,
85 pub unprotected_headers: Vec<(Label, Value)>,
171 fn from_cbor_value(value: Value) -> Result<Self, CoseError> { in from_cbor_value()
172 let permissions_vec: Vec<(Value, Value)> = match value { in from_cbor_value()
173 Value::Map(permissions) => permissions, in from_cbor_value()
178 if let Value::Integer(k) = key { in from_cbor_value()
218 fn to_cbor_value(self) -> Result<Value, CoseError> { in to_cbor_value() argument
219 let mut cbor_permissions = Vec::<(Value, Value)>::new(); in to_cbor_value()
221 let key = Value::Integer(SOURCE_ID_KEY.into()); in to_cbor_value()
[all …]
/system/core/init/fuzzer/
DREADME.md14 | Parameter| Valid Values| Configured Value|
16 |`kValidPaths`| 0.`/system/etc/init/hw/init.rc`,<br/> 1.`/system/etc/init` |Value obtained from Fuz…
17 …`,<br/> 4.`{"","14", "10", "unlimited"}`,<br/> 5.`{"","15", "10", "-1"}` |Value obtained from Fuzz…
35 | Parameter| Valid Values |Configured Value|
37 …/> 3.`UINT`,<br/> 4.`DOUBLE`,<br/> 5.`SIZE`,<br/>6.`ENUM`,<br/>7.`RANDOM`|Value obtained from Fuzz…
71 | Parameter| Valid Values| Configured Value|
73 | `major` | `UINT32_MIN` to `UINT32_MAX` | Value obtained from FuzzedDataProvider|
74 | `minor` | `UINT32_MIN` to `UINT32_MAX` | Value obtained from FuzzedDataProvider|
75 | `partition_num ` | `UINT32_MIN` to `UINT32_MAX` | Value obtained from FuzzedDataProvider|
76 | `uid` | `UINT32_MIN` to `UINT32_MAX` | Value obtained from FuzzedDataProvider|
[all …]
/system/keymint/common/src/
Dcrypto.rs231 fn from_cbor_value(value: cbor::value::Value) -> Result<Self, CborError> { in from_cbor_value()
233 cbor::value::Value::Array(a) if a.len() == 3 => a, in from_cbor_value()
238 cbor::value::Value::Bool(b) => b, in from_cbor_value()
242 cbor::value::Value::Integer(i) => i.try_into()?, in from_cbor_value()
291 cbor::value::Value::Array(a) if a.len() == 3 => a, in from_cbor_value()
332 fn to_cbor_value(self) -> Result<cbor::value::Value, CborError> { in to_cbor_value() argument
334 Ok(cbor::value::Value::Array(match self { in to_cbor_value()
336 cbor::value::Value::Integer((Algorithm::Aes as i32).into()), in to_cbor_value()
337 cbor::value::Value::Bool(true), in to_cbor_value()
338 cbor::value::Value::Bytes(try_to_vec(&k)?), in to_cbor_value()
[all …]
/system/secretkeeper/client/src/
Ddice.rs20 use ciborium::Value;
84 if matches!(&&dice_chain[..], [Value::Integer(_version), Value::Bytes(_public_key), ..]) { in to_explicit_chain()
87 let mut res: Vec<Value> = Vec::with_capacity(dice_chain.len() + 1); in to_explicit_chain()
89 res.push(Value::from(EXPLICIT_KEY_DICE_CERT_CHAIN_VERSION)); in to_explicit_chain()
99 res.push(Value::Bytes(root_key)); in to_explicit_chain()
101 Ok(Value::Array(res).to_vec()?) in to_explicit_chain()
104 fn deserialize_cbor_array(cbor_array: &[u8]) -> Result<Vec<Value>, Error> { in deserialize_cbor_array() argument
105 let value = Value::from_slice(cbor_array)?; in deserialize_cbor_array()
119 let chain = Value::from_slice(&explicit_chain).unwrap(); in implicit_to_explicit_dice_chain_conversion()
/system/logging/rust/
Dstructured_logger.rs20 pub trait Value { trait
25 impl Value for f32 {
31 impl Value for i32 {
37 impl Value for i64 {
43 impl Value for &str { impl
49 impl Value for String {
64 impl Value for StructuredLogSection {
103 $(ctx = ctx.and_then(|c| $crate::Value::add_to_context(&$entry, c)
/system/secretkeeper/dice_policy/tests/
Dtest.rs18 use ciborium::{cbor, Value};
63 let rot_key = Value::Bytes(CoseKey::default().to_vec().unwrap()); in get_example()
106 Value::from(EXPLICIT_KEY_DICE_CERT_CHAIN_VERSION), in get_example()
121 Value::Text(EXAMPLE_STRING.to_string()), in get_example()
127 Value::from(EXAMPLE_NUM_1), in get_example()
136 Value::Text(EXAMPLE_STRING.to_string()), in get_example()
142 Value::from(EXAMPLE_NUM_1), in get_example()
148 Value::from(CONSTRAINED_ARRAY[0]), in get_example()
154 Value::from(CONSTRAINED_ARRAY[1]), in get_example()
160 Value::from(CONSTRAINED_ARRAY[2]), in get_example()
[all …]
/system/authgraph/tests/src/
Dlib.rs15 cbor::Value,
274 .param(iana::OkpKeyParameter::Crv as i64, Value::from(iana::EllipticCurve::Ed25519 as u64)) in test_ecdsa()
277 Value::from( in test_ecdsa()
355 .param(iana::OkpKeyParameter::Crv as i64, Value::from(iana::EllipticCurve::Ed25519 as u64)) in test_ed25519_round_trip()
358 Value::from( in test_ed25519_round_trip()
883 (Label::Int(iana::Ec2KeyParameter::X.to_i64()), Value::Bytes(root_pub_key.to_vec())), in create_identity()
891 let cert_chain = Value::Array(vec![ in create_identity()
892 Value::Integer(EXPLICIT_KEY_DICE_CERT_CHAIN_VERSION.into()), in create_identity()
893 Value::Bytes(root_pub_cose_key_bstr.clone()), in create_identity()
895 let identity = Value::Array(vec![ in create_identity()
[all …]
/system/tools/hidl/hidl2aidl/test/
Dndk_test_compile.cpp53 static_assert(static_cast<int>(aidl::hidl2aidl::test::Value::A) == 3);
54 static_assert(static_cast<int>(aidl::hidl2aidl::test::Value::B) == 7);
55 static_assert(static_cast<int>(aidl::hidl2aidl::test::Value::C) == 8);
56 static_assert(static_cast<int>(aidl::hidl2aidl::test::Value::D) == 9);
57 static_assert(static_cast<int>(aidl::hidl2aidl::test::Value::E) == 27);
58 static_assert(static_cast<int>(aidl::hidl2aidl::test::Value::F) == 28);
Dcpp_test_compile.cpp71 static_assert(static_cast<int>(hidl2aidl::test::Value::A) == 3);
72 static_assert(static_cast<int>(hidl2aidl::test::Value::B) == 7);
73 static_assert(static_cast<int>(hidl2aidl::test::Value::C) == 8);
74 static_assert(static_cast<int>(hidl2aidl::test::Value::D) == 9);
75 static_assert(static_cast<int>(hidl2aidl::test::Value::E) == 27);
76 static_assert(static_cast<int>(hidl2aidl::test::Value::F) == 28);
/system/core/toolbox/
Dgetprop.cpp33 Value, enumerator
55 if (result_type != ResultType::Value) { in PrintAllProperties()
75 case ResultType::Value: in PrintProperty()
94 auto result_type = ResultType::Value; in getprop_main()
119 if (result_type != ResultType::Value) { in getprop_main()
126 if (result_type != ResultType::Value) { in getprop_main()
140 if (result_type != ResultType::Value) { in getprop_main()

1234