Home
last modified time | relevance | path

Searched refs:to_vec (Results 1 – 25 of 62) sorted by relevance

123

/ohos5.0/base/security/asset/services/common/src/
H A Dcalling_info.rs53 owner_info.append(&mut "_".to_string().as_bytes().to_vec()); in build()
112 let process_name = "test_process".as_bytes().to_vec(); in test_build_callig_info_specific_and_hap()
113 let app_id = "test_app_id".as_bytes().to_vec(); in test_build_callig_info_specific_and_hap()
125 let owner_info = "test_app_id_0".as_bytes().to_vec(); in test_build_callig_info_specific_and_hap()
131 let process_name = "test_process".as_bytes().to_vec(); in test_build_callig_info_hap()
132 let app_id = "test_app_id".as_bytes().to_vec(); in test_build_callig_info_hap()
144 let owner_info = "test_app_id_0".as_bytes().to_vec(); in test_build_callig_info_hap()
150 let process_name = "test_process".as_bytes().to_vec(); in test_build_callig_info_native()
162 let owner_info = "test_process_999".as_bytes().to_vec(); in test_build_callig_info_native()
169 let process_name = "test_process".as_bytes().to_vec(); in test_build_callig_info_specific_and_native()
[all …]
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/h2/hpack/representation/
H A Ddecoder.rs620 … { LiteralWithIndexing, Literal => b"custom-key".to_vec(), b"custom-header".to_vec() } in ut_repr_decoder()
632 { LiteralNeverIndexed, Literal => b"password".to_vec(), b"secret".to_vec() } in ut_repr_decoder()
667 { LiteralWithIndexing, Literal => b"custom-key".to_vec(), b"custom-value".to_vec() } in ut_repr_decoder()
696 { LiteralWithIndexing, Literal => b"custom-key".to_vec(), b"custom-value".to_vec() } in ut_repr_decoder()
706 { LiteralWithIndexing, Index => 8, b"302".to_vec() }, in ut_repr_decoder()
715 { LiteralWithIndexing, Index => 8, b"307".to_vec() }, in ut_repr_decoder()
785 let name = Name::Literal("test_name".as_bytes().to_vec()); in ut_finish_decode()
797 let name = Name::Literal("test_name".as_bytes().to_vec()); in ut_finish_decode()
809 let name = Name::Literal("test_name".as_bytes().to_vec()); in ut_finish_decode()
821 let name = Name::Literal("test_name".as_bytes().to_vec()); in ut_finish_decode()
[all …]
/ohos5.0/base/security/asset/services/db_operator/src/test/
H A Dtest_table.rs98 datas.insert_attr("Owner", b"owner1".to_vec()); in insert_test_data()
99 datas.insert_attr("Alias", b"alias1".to_vec()); in insert_test_data()
100 datas.insert_attr("value", b"aaaa".to_vec()); in insert_test_data()
103 datas.insert_attr("Owner", b"owner2".to_vec()); in insert_test_data()
104 datas.insert_attr("Alias", b"alias2".to_vec()); in insert_test_data()
105 datas.insert_attr("value", b"bbbb".to_vec()); in insert_test_data()
108 datas.insert_attr("Owner", b"owner2".to_vec()); in insert_test_data()
109 datas.insert_attr("Alias", b"alias3".to_vec()); in insert_test_data()
110 datas.insert_attr("value", b"cccc".to_vec()); in insert_test_data()
136 datas.insert_attr("Owner", b"owner1".to_vec()); in data_life_circle()
[all …]
H A Dtest_database.rs74 db_data.insert(column::SECRET, Value::Bytes(column::SECRET.as_bytes().to_vec())); in add_bytes_column()
75 db_data.insert(column::ALIAS, Value::Bytes(column::ALIAS.as_bytes().to_vec())); in add_bytes_column()
76 db_data.insert(column::OWNER, Value::Bytes(column::OWNER.as_bytes().to_vec())); in add_bytes_column()
148 def.insert(column::ALIAS, Value::Bytes(b"Alias2".to_vec())); in insert_data_with_different_alias()
169 datas.insert(column::OWNER, Value::Bytes(column::OWNER.as_bytes().to_vec())); in delete_data()
170 datas.insert(column::ALIAS, Value::Bytes(column::ALIAS.as_bytes().to_vec())); in delete_data()
189 datas.insert(column::OWNER, Value::Bytes(column::OWNER.as_bytes().to_vec())); in update_data()
190 datas.insert(column::ALIAS, Value::Bytes(column::ALIAS.as_bytes().to_vec())); in update_data()
222 def.insert(column::ALIAS, Value::Bytes(b"AAA".to_vec())); in query_ordered_data()
242 assert_eq!(&(b"AAA".to_vec()), res[0].get_bytes_attr(&column::ALIAS).unwrap()); in query_ordered_data()
[all …]
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/body/mime/decode/
H A Dmulti.rs547 .set_boundary(b"abc".to_vec()) in ut_mime_multi_decoder_new()
573 .set_boundary(b"abc".to_vec()) in ut_mime_multi_decoder_one_part()
606 .set_boundary(b"abc".to_vec()) in ut_mime_multi_decoder_one_part_no_headers()
638 .set_boundary(b"abc".to_vec()) in ut_mime_multi_decoder_one_part_no_body()
671 .set_boundary(b"-".to_vec()) in ut_mime_multi_decoder_several_parts()
711 .set_boundary(b"-".to_vec()) in ut_mime_multi_decoder_several_parts_has_lwsp()
752 .set_boundary(b"abc".to_vec()) in ut_mime_multi_decoder_nest()
793 .set_boundary(b"abc".to_vec()) in ut_mime_multi_decoder_nest2()
841 .set_boundary(b"abc".to_vec()) in ut_mime_multi_decoder_nest3()
889 .set_boundary(b"abc".to_vec()) in ut_mime_multi_decoder_nest4()
[all …]
H A Dpart.rs42 boundary: b"-".to_vec(), in new()
53 self.boundary = b"-".to_vec(); in init()
185 .body_from_owned(b"abcd".to_vec()) in ut_mime_part_decoder_new_by_crlf()
192 decoder.set_boundary(b"abc".to_vec()); in ut_mime_part_decoder_new_by_crlf()
204 decoder.set_boundary(b"abc".to_vec()); in ut_mime_part_decoder_new_by_crlf()
216 decoder.set_boundary(b"abc".to_vec()); in ut_mime_part_decoder_new_by_crlf()
236 .body_from_owned(b"abcd".to_vec()) in ut_mime_part_decoder_new_by_lf()
243 decoder.set_boundary(b"abc".to_vec()); in ut_mime_part_decoder_new_by_lf()
255 decoder.set_boundary(b"abc".to_vec()); in ut_mime_part_decoder_new_by_lf()
267 decoder.set_boundary(b"abc".to_vec()); in ut_mime_part_decoder_new_by_lf()
[all …]
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/
H A Dheaders.rs333 inner: vec![bytes.to_vec()], in from_bytes()
372 self.inner.push(bytes.to_vec()); in append_bytes()
404 pub(crate) fn to_vec(&self) -> Vec<u8> { in to_vec() method
1151 b"text/html, application/xhtml+xml".to_vec(), in ut_header_value_append_bytes()
1152 b"teXt/plain, teXt/css".to_vec(), in ut_header_value_append_bytes()
1153 b"application/xml".to_vec(), in ut_header_value_append_bytes()
1171 b"text/plain, text/css".to_vec(), in ut_header_value_to_string()
1172 b"application/xml".to_vec(), in ut_header_value_to_string()
1238 inner: [b"text/html".to_vec()].to_vec(), in ut_change_headers_info()
1264 inner: [b"text/html, application/xhtml+xml, application/xml".to_vec()].to_vec(), in ut_change_headers_info()
[all …]
/ohos5.0/base/security/asset/test/unittest/inner_kits_rust/src/
H A Dcommon.rs54 … asset_sdk::Manager::build()?.remove(&AssetMap::from([(Tag::Alias, Value::Bytes(alias.to_vec()))])) in remove_by_alias()
77 (Tag::Alias, Value::Bytes(alias.to_vec())), in query_all_by_alias()
84 (Tag::Alias, Value::Bytes(alias.to_vec())), in query_attr_by_alias()
91 (Tag::Alias, Value::Bytes(alias.to_vec())), in add_default_asset()
92 (Tag::Secret, Value::Bytes(secret.to_vec())), in add_default_asset()
99 (Tag::Alias, Value::Bytes(alias.to_vec())), in add_default_auth_asset()
100 (Tag::Secret, Value::Bytes(secret.to_vec())), in add_default_auth_asset()
108 attrs.insert_attr(Tag::Alias, alias.to_vec()); in add_all_tags_asset()
109 attrs.insert_attr(Tag::Secret, SECRET.to_vec()); in add_all_tags_asset()
H A Dquery.rs164 let query = AssetMap::from([(Tag::Secret, Value::Bytes(function_name.to_vec()))]); in query_with_secret()
186 add.insert_attr(Tag::Secret, function_name.as_bytes().to_vec()); in query_with_order()
300 query.insert_attr(tag, val.to_vec()); in query_with_bytes_tag()
331 attrs.insert_attr(Tag::Alias, alias.to_vec()); in query_with_return_order_by()
332 attrs.insert_attr(Tag::Secret, alias.to_vec()); in query_with_return_order_by()
333 attrs.insert_attr(Tag::DataLabelNormal1, normal_label.to_vec()); in query_with_return_order_by()
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/body/mime/common/
H A Dmod.rs193 let str = value.to_vec(); in get_content_type_boundary()
207 return Some(boundary[1..boundary.len() - 1].to_vec()); in get_content_type_boundary()
209 return Some(boundary[..].to_vec()); in get_content_type_boundary()
239 Some(b"gc0p4Jq0M2Yt08j34c0p".to_vec()) in ut_get_content_type_boundary()
251 Some(b"gc0p4Jq0M2Yt08j34c0p".to_vec()) in ut_get_content_type_boundary()
263 Some(b"gc0pJq0M:08jU534c0p".to_vec()) in ut_get_content_type_boundary()
H A Dpart.rs583 .body_from_owned(b"1111".to_vec()) in ut_mime_part_body()
599 .body_from_owned(b"1111".to_vec()) in ut_mime_part_body_mut()
616 .body_from_owned(b"1111".to_vec()) in ut_mime_part_body_once()
619 assert_eq!(part.body_once().unwrap(), b"1111".to_vec()); in ut_mime_part_body_once()
/ohos5.0/base/security/asset/services/db_key_operator/src/
H A Dlib.rs33 let alias = "db_key_secret_key".as_bytes().to_vec(); in build_db_key_secret_key()
70 let aad: Vec<u8> = TRIVIAL_AAD_FOR_DB_KEY.as_bytes().to_vec(); in decrypt_db_key_cipher()
82 Ok(Self { db_key: db_key.to_vec() }) in generate_db_key()
88 let aad: Vec<u8> = TRIVIAL_AAD_FOR_DB_KEY.as_bytes().to_vec(); in encrypt_db_key()
/ohos5.0/foundation/communication/netstack/interfaces/innerkits/rust/ylong_http_client/src/reqwest_impl/async_impl/uploader/
H A Dmultipart.rs144 b"Content-Disposition: form-data".to_vec(), in build_status()
159 states.push(MultiPartState::bytes(b"\r\n".to_vec())); in build_status()
167 states.push(MultiPartState::bytes(b"\r\n".to_vec())); in build_status()
173 states.push(MultiPartState::bytes(b"\r\n".to_vec())); in build_status()
350 let body = body.as_ref().to_vec(); in body()
/ohos5.0/build/rust/tests/test_cxx_rust/src/
H A Dmain.rs67 let chunks = vec![b"fearless".to_vec(), b"concurrency".to_vec()]; in main()
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/body/mime/encode/
H A Dmulti.rs205 MultiStage::Crlf => self.src = b"\r\n".to_vec(), in temp_src()
206 MultiStage::Dash => self.src = b"--".to_vec(), in temp_src()
485 .set_content_type(b"multipart/mixed", b"abc".to_vec()) in ut_mime_multi_encoder_data_many_parts_nesting()
504 .set_boundary(b"abcde".to_vec()) in ut_mime_multi_encoder_data_many_parts_nesting()
557 .set_content_type(b"multipart/mixed", b"abc".to_vec()) in mime_multi_encoder_data_many_parts_nesting_then_async_data()
576 .set_boundary(b"abcde".to_vec()) in mime_multi_encoder_data_many_parts_nesting_then_async_data()
H A Dpart.rs107 self.src = b"\r\n".to_vec(); in check_next()
256 BodyOwned: b"123456".to_vec(), in ut_mime_part_encoder_body_from_owned()
408 BodyOwned: b"123456".to_vec(), in mime_part_encoder_body_from_owned_then_async_data()
/ohos5.0/base/security/asset/services/core_service/src/operations/
H A Doperation_update.rs37 let valid_tags = common::NORMAL_LOCAL_LABEL_ATTRS.to_vec(); in is_only_change_local_labels()
71 let mut valid_tags = common::CRITICAL_LABEL_ATTRS.to_vec(); in check_arguments()
83 valid_tags = common::NORMAL_LABEL_ATTRS.to_vec(); in check_arguments()
H A Doperation_pre_query.rs32 let mut valid_tags = common::CRITICAL_LABEL_ATTRS.to_vec(); in check_arguments()
81 let challenge = crypto.init_key()?.to_vec(); in pre_query()
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/examples/
H A Dmimebody_multi.rs126 .set_content_type(b"multipart/mixed", b"unique-boundary-1".to_vec()) in main()
142 .set_content_type(b"multipart/parallel", b"unique-boundary-2".to_vec()) in main()
H A Dmimebody_multi_then_async_data.rs51 .set_content_type(b"multipart/mixed", b"unique-boundary-1".to_vec()) in main()
67 .set_content_type(b"multipart/parallel", b"unique-boundary-2".to_vec()) in main()
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/h3/
H A Dencoder.rs463 f_encoder.header_payload_buffer[..f_encoder.remaining_header_payload].to_vec() in literal_field_line_with_name_reference()
467 f_encoder.header_payload_buffer[..f_encoder.remaining_header_payload].to_vec() in literal_field_line_with_name_reference()
500 f_encoder.header_payload_buffer[..f_encoder.remaining_header_payload].to_vec() in dynamic_table()
504 f_encoder.qpack_encoder_buffer[..f_encoder.remaining_qpack_payload].to_vec() in dynamic_table()
508 f_encoder.header_payload_buffer[..f_encoder.remaining_header_payload].to_vec() in dynamic_table()
512 f_encoder.qpack_encoder_buffer[..f_encoder.remaining_qpack_payload].to_vec() in dynamic_table()
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/h3/qpack/
H A Ddecoder.rs645 let text = decode($input).unwrap().as_slice().to_vec(); in ut_qpack_decoder()
722 .to_vec(); in ut_qpack_decoder()
739 .to_vec(); in ut_qpack_decoder()
759 let ins = decode("02").unwrap().as_slice().to_vec(); in ut_qpack_decoder()
784 .to_vec(); in ut_qpack_decoder()
800 let text = decode("00").unwrap().as_slice().to_vec(); //510b2f696e6465782e68746d6c in ut_qpack_decoder()
807 .to_vec(); in ut_qpack_decoder()
956 let ins = decode("3fbd01").unwrap().as_slice().to_vec(); in ut_qpack_decoder()
968 .to_vec(); in ut_qpack_decoder()
/ohos5.0/commonlibrary/rust/ylong_json/src/reader/
H A Dslice_reader.rs124 .map(|c| self.slice[c.0..self.index].to_vec()) in cached_data()
136 .map(|c| self.slice[c.0..self.index].to_vec()) in take_cached_data()
153 self.remainder_slice().to_vec() in remainder_data()
484 assert_eq!(slice_reader.remainder_data(), slice.as_bytes().to_vec()); in ut_slice_reader_remainder_data()
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/body/mime/
H A Dsimple.rs144 b"Content-Disposition: form-data".to_vec(), in build_status()
159 states.push(MultiPartState::bytes(b"\r\n".to_vec())); in build_status()
167 states.push(MultiPartState::bytes(b"\r\n".to_vec())); in build_status()
173 states.push(MultiPartState::bytes(b"\r\n".to_vec())); in build_status()
380 let body = body.as_ref().to_vec(); in body()
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/tests/
H A Dasync_buf_read.rs123 assert_eq!(segments.next().await.unwrap(), Some(b"lorem".to_vec())); in sdv_buf_reader_split()
124 assert_eq!(segments.next().await.unwrap(), Some(b"ipsum".to_vec())); in sdv_buf_reader_split()
125 assert_eq!(segments.next().await.unwrap(), Some(b"dolor".to_vec())); in sdv_buf_reader_split()

123