Lines Matching refs:Value
29 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()
222 let val = Value::Bytes(source_id.to_vec()?); in to_cbor_value()
226 let key = Value::Integer(SINK_ID_KEY.into()); in to_cbor_value()
227 let val = Value::Bytes(sink_id.to_vec()?); in to_cbor_value()
231 let key = Value::Integer(MINTING_ALLOWED_KEY.into()); in to_cbor_value()
234 array.try_push(Value::Bytes(a.to_vec()?)).map_err(|_| CoseError::EncodeFailed)?; in to_cbor_value()
236 let val = Value::Array(array); in to_cbor_value()
240 let key = Value::Integer(DELETED_ON_BIOMETRIC_CHANGE_KEY.into()); in to_cbor_value()
241 let val = Value::Bool(del_on_biometric_change); in to_cbor_value()
244 Ok(Value::Map(cbor_permissions)) in to_cbor_value()