Lines Matching refs:Value
231 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()
342 cbor::value::Value::Integer((Algorithm::TripleDes as i32).into()), in to_cbor_value()
343 cbor::value::Value::Bool(true), in to_cbor_value()
344 cbor::value::Value::Bytes(try_to_vec(&k)?), in to_cbor_value()
348 cbor::value::Value::Integer((Algorithm::Hmac as i32).into()), in to_cbor_value()
349 cbor::value::Value::Bool(true), in to_cbor_value()
350 cbor::value::Value::Bytes(try_to_vec(&k)?), in to_cbor_value()
354 cbor::value::Value::Integer((Algorithm::Rsa as i32).into()), in to_cbor_value()
355 cbor::value::Value::Bool(true), in to_cbor_value()
356 cbor::value::Value::Bytes(try_to_vec(&k)?), in to_cbor_value()
360 cbor::value::Value::Integer((Algorithm::Ec as i32).into()), in to_cbor_value()
361 cbor::value::Value::Bool(true), in to_cbor_value()
362 cbor::value::Value::Array( in to_cbor_value()
364 cbor::value::Value::Integer((curve as i32).into()), in to_cbor_value()
365 cbor::value::Value::Integer((curve_type as i32).into()), in to_cbor_value()
366 cbor::value::Value::Bytes(try_to_vec(&k)?), in to_cbor_value()
374 cbor::value::Value::Integer((Algorithm::Aes as i32).into()), in to_cbor_value()
375 cbor::value::Value::Bool(false), in to_cbor_value()
377 aes::Key::Aes128(k) => cbor::value::Value::Bytes(try_to_vec(&k)?), in to_cbor_value()
378 aes::Key::Aes192(k) => cbor::value::Value::Bytes(try_to_vec(&k)?), in to_cbor_value()
379 aes::Key::Aes256(k) => cbor::value::Value::Bytes(try_to_vec(&k)?), in to_cbor_value()
385 cbor::value::Value::Integer((Algorithm::TripleDes as i32).into()), in to_cbor_value()
386 cbor::value::Value::Bool(false), in to_cbor_value()
387 cbor::value::Value::Bytes(k.0.to_vec()), in to_cbor_value()
391 cbor::value::Value::Integer((Algorithm::Hmac as i32).into()), in to_cbor_value()
392 cbor::value::Value::Bool(false), in to_cbor_value()
393 cbor::value::Value::Bytes(k.0.clone()), in to_cbor_value()
397 cbor::value::Value::Integer((Algorithm::Rsa as i32).into()), in to_cbor_value()
398 cbor::value::Value::Bool(false), in to_cbor_value()
399 cbor::value::Value::Bytes(k.0.clone()), in to_cbor_value()
403 cbor::value::Value::Integer((Algorithm::Ec as i32).into()), in to_cbor_value()
404 cbor::value::Value::Bool(false), in to_cbor_value()
405 cbor::value::Value::Array( in to_cbor_value()
407 cbor::value::Value::Integer((curve as i32).into()), in to_cbor_value()
408 cbor::value::Value::Integer((curve_type as i32).into()), in to_cbor_value()
409 cbor::value::Value::Bytes(k.private_key_bytes().to_vec()), in to_cbor_value()