Home
last modified time | relevance | path

Searched refs:uint8_t (Results 1 – 25 of 52) sorted by relevance

123

/bootable/recovery/tests/unit/
Dasn1_decoder_test.cpp26 uint8_t empty[] = {}; in TEST()
36 const uint8_t* junk; in TEST()
43 uint8_t truncated[] = { 0xA0, 0x82 }; in TEST()
49 uint8_t truncated[] = { 0xA0, 0x8a, 0xA5, 0x5A, 0xA5, 0x5A, 0xA5, 0x5A, 0xA5, 0x5A, 0xA5, 0x5A }; in TEST()
55 uint8_t data[] = { 0xA5, 0x02, 0x06, 0x01, 0x01 }; in TEST()
60 const uint8_t* oid; in TEST()
66 uint8_t data[] = { 0xA5, 0x03, 0x06, 0x01, 0x01 }; in TEST()
71 const uint8_t* oid; in TEST()
79 uint8_t truncated[] = { 0xA2, 0x82 }; in TEST()
85 uint8_t data[] = { 0xA0, 0x03, 0x02, 0x01, 0x01, 0xA1, 0x03, 0x02, 0x01, 0x01, 0x06, 0x01, 0xA5 }; in TEST()
[all …]
Dpackage_test.cpp66 std::vector<uint8_t> buffer(file_content_.size()); in TEST_F()
77 std::vector<uint8_t> buffer(file_content_.size()); in TEST_F()
86 std::vector<uint8_t> expected_sha(SHA_DIGEST_LENGTH); in TEST_F()
87 SHA1(reinterpret_cast<uint8_t*>(file_content_.data()), hash_size, expected_sha.data()); in TEST_F()
96 std::vector<uint8_t> calculated_sha(SHA_DIGEST_LENGTH); in TEST_F()
112 std::vector<uint8_t> extracted(entry_name.size()); in TEST_F()
Dfuse_provider_test.cpp70 std::vector<uint8_t> result(2000); in TEST()
72 ASSERT_EQ(std::vector<uint8_t>(content.begin() + 4096, content.begin() + 6096), result); in TEST()
76 ASSERT_EQ(std::vector<uint8_t>(content.begin(), content.begin() + 20000), result); in TEST()
97 std::vector<uint8_t> result(20000); in TEST()
103 ASSERT_EQ(std::vector<uint8_t>(expected.begin(), expected.end()), result); in TEST()
Dcommands_test.cpp442 auto block_reader = [](const RangeSet& src, std::vector<uint8_t>* block_buffer) -> int { in TEST()
446 auto stash_reader = [](const std::string&, std::vector<uint8_t>*) -> int { return 0; }; in TEST() argument
447 std::vector<uint8_t> buffer(source.blocks() * kBlockSize); in TEST()
451 uint8_t digest[SHA_DIGEST_LENGTH]; in TEST()
461 auto block_reader = [](const RangeSet& src, std::vector<uint8_t>* block_buffer) -> int { in TEST()
465 auto stash_reader = [](const std::string&, std::vector<uint8_t>* stash_buffer) -> int { in TEST()
469 std::vector<uint8_t> buffer(source.blocks() * kBlockSize); in TEST()
473 uint8_t digest[SHA_DIGEST_LENGTH]; in TEST()
481 auto block_reader = [](const RangeSet&, std::vector<uint8_t>*) -> int { return 0; }; in TEST() argument
482 auto stash_reader = [](const std::string&, std::vector<uint8_t>*) -> int { return 0; }; in TEST() argument
[all …]
Dapplypatch_modes_test.cpp47 uint8_t digest[SHA_DIGEST_LENGTH]; in GetEmmcTargetString()
48 SHA1(reinterpret_cast<const uint8_t*>(data.c_str()), data.size(), digest); in GetEmmcTargetString()
143 bsdiff::bsdiff(reinterpret_cast<const uint8_t*>(src_content.data()), src_content.size(), in TEST_F()
144 reinterpret_cast<const uint8_t*>(tgt_content.data()), tgt_content.size(), in TEST_F()
/bootable/recovery/applypatch/include/applypatch/
Dimgdiff_image.h41 ImageChunk(int type, size_t start, const std::vector<uint8_t>* file_content, size_t raw_data_len,
48 const uint8_t* GetRawData() const;
64 const uint8_t* DataForPatch() const;
69 void SetUncompressedData(std::vector<uint8_t> data);
70 bool SetBonusData(const std::vector<uint8_t>& bonus_data);
100 std::vector<uint8_t>* patch_data,
108 const std::vector<uint8_t>* input_file_ptr_; // ptr to the full content of original input file
115 std::vector<uint8_t> uncompressed_data_;
123 PatchChunk(const ImageChunk& tgt, const ImageChunk& src, std::vector<uint8_t> data);
156 std::vector<uint8_t> data_; // storage for the patch data
[all …]
/bootable/recovery/otautil/include/otautil/
Dprint_sha1.h25 static std::string print_sha1(const uint8_t* sha1, size_t len) { in print_sha1()
35 [[maybe_unused]] static std::string print_sha1(const uint8_t sha1[SHA_DIGEST_LENGTH]) { in print_sha1()
39 [[maybe_unused]] static std::string short_sha1(const uint8_t sha1[SHA_DIGEST_LENGTH]) { in short_sha1()
43 [[maybe_unused]] static std::string print_hex(const uint8_t* bytes, size_t len) { in print_hex()
/bootable/recovery/install/include/private/
Dasn1_decoder.h25 asn1_context(const uint8_t* buffer, size_t length) : p_(buffer), length_(length), app_type_(0) {} in asn1_context()
32 bool asn1_oid_get(const uint8_t** oid, size_t* length);
33 bool asn1_octet_string_get(const uint8_t** octet_string, size_t* length);
51 const uint8_t* p_;
/bootable/recovery/install/
Dpackage.cpp39 MemoryPackage(std::vector<uint8_t> content, const std::function<void(float)>& set_progress);
57 bool ReadFullyAtOffset(uint8_t* buffer, uint64_t byte_count, uint64_t offset) override;
65 const uint8_t* addr_; // Start address of the package in memory.
72 std::vector<uint8_t> package_content_;
105 bool ReadFullyAtOffset(uint8_t* buffer, uint64_t byte_count, uint64_t offset) override;
149 std::vector<uint8_t> content, const std::function<void(float)>& set_progress) { in CreateMemoryPackage()
161 MemoryPackage::MemoryPackage(std::vector<uint8_t> content, in MemoryPackage()
176 bool MemoryPackage::ReadFullyAtOffset(uint8_t* buffer, uint64_t byte_count, uint64_t offset) { in ReadFullyAtOffset()
205 if (auto err = OpenArchiveFromMemory(const_cast<uint8_t*>(addr_), package_size_, path_.c_str(), in GetZipArchiveHandle()
227 bool FilePackage::ReadFullyAtOffset(uint8_t* buffer, uint64_t byte_count, uint64_t offset) { in ReadFullyAtOffset()
[all …]
Dverifier.cpp67 static bool read_pkcs7(const uint8_t* pkcs7_der, size_t pkcs7_der_len, in read_pkcs7()
68 std::vector<uint8_t>* sig_der) { in read_pkcs7()
102 const uint8_t* sig_der_ptr; in read_pkcs7()
133 uint8_t footer[FOOTER_SIZE]; in verify_file()
175 uint8_t eocd[eocd_size]; in verify_file()
241 uint8_t sha1[SHA_DIGEST_LENGTH]; in verify_file()
243 uint8_t sha256[SHA256_DIGEST_LENGTH]; in verify_file()
246 const uint8_t* signature = eocd + eocd_size - signature_start; in verify_file()
252 std::vector<uint8_t> sig_der; in verify_file()
262 const uint8_t* hash; in verify_file()
[all …]
/bootable/recovery/applypatch/
Dbspatch.cpp73 reinterpret_cast<const uint8_t*>(&patch.data[patch_offset]), in ApplyBSDiffPatch()
79 uint8_t digest[SHA_DIGEST_LENGTH]; in ApplyBSDiffPatch()
80 SHA1(reinterpret_cast<const uint8_t*>(patch.data.data() + patch_offset), in ApplyBSDiffPatch()
Dapplypatch.cpp72 uint8_t expected_sha1[SHA_DIGEST_LENGTH]; in ReadPartitionToBuffer()
231 int ParseSha1(const std::string& str, uint8_t* digest) { in ParseSha1()
233 uint8_t* pd = digest; in ParseSha1()
308 uint8_t expected_sha1[SHA_DIGEST_LENGTH]; in FlashPartition()
330 uint8_t expected_sha1[SHA_DIGEST_LENGTH]; in GenerateTarget()
394 uint8_t patch_digest[SHA_DIGEST_LENGTH]; in GenerateTarget()
395 SHA1(reinterpret_cast<const uint8_t*>(patch.data.data()), patch.data.size(), patch_digest); in GenerateTarget()
399 uint8_t bonus_digest[SHA_DIGEST_LENGTH]; in GenerateTarget()
400 SHA1(reinterpret_cast<const uint8_t*>(bonus_data->data.data()), bonus_data->data.size(), in GenerateTarget()
/bootable/recovery/minui/
Dgraphics_fbdev.h37 uint8_t* data() override { in data()
48 uint8_t* buffer_{ nullptr };
67 std::vector<uint8_t> memory_buffer;
Dresources.cpp54 static_cast<uint8_t*>(aligned_alloc(kSurfaceDataAlignment, result->data_size_))); in Create()
78 uint8_t header[8]; in PngHandler()
152 static void TransformRgbToDraw(const uint8_t* input_row, uint8_t* output_row, int channels, in TransformRgbToDraw()
154 const uint8_t* ip = input_row; in TransformRgbToDraw()
155 uint8_t* op = output_row; in TransformRgbToDraw()
207 std::vector<uint8_t> p_row(width * 4); in res_create_display_surface()
279 std::vector<uint8_t> p_row(width * 4); in res_create_multi_display_surface()
282 uint8_t* out_row = surface[frame]->data() + (y / *frames) * surface[frame]->row_bytes; in res_create_multi_display_surface()
325 uint8_t* p_row = surface->data() + y * surface->row_bytes; in res_create_alpha_surface()
378 std::vector<uint8_t> row(png_handler.width()); in get_locales_in_png()
[all …]
Dgraphics.cpp80 static inline uint32_t pixel_blend(uint8_t alpha, uint32_t pix) { in pixel_blend()
142 static void TextBlend(const uint8_t* src_p, int src_row_bytes, uint32_t* dst_p, int dst_row_pixels, in TextBlend()
144 uint8_t alpha_current = static_cast<uint8_t>((alpha_mask & gr_current) >> 24); in TextBlend()
146 const uint8_t* sx = src_p; in TextBlend()
149 uint8_t a = *sx++; in TextBlend()
180 const uint8_t* src_p = font->texture->data() + ((ch - ' ') * font->char_width) + in gr_text()
205 const uint8_t* src_p = icon->data(); in gr_texticon()
248 uint8_t alpha = static_cast<uint8_t>(((gr_current & alpha_mask) >> 24)); in gr_fill()
292 const uint8_t* src_p = source->data() + sy * source->row_bytes + sx * source->pixel_bytes; in gr_blit()
293 uint8_t* dst_p = gr_draw->data() + dy * gr_draw->row_bytes + dx * gr_draw->pixel_bytes; in gr_blit()
Dgraphics_adf.h37 uint8_t* data() override { in data()
53 uint8_t* mmapped_buffer_{ nullptr };
Dgraphics_drm.h36 uint8_t* data() override { in data()
51 uint8_t* mmapped_buffer_{ nullptr };
/bootable/recovery/bootloader_message/include/bootloader_message/
Dbootloader_message.h89 uint8_t version;
91 uint8_t merge_status; // IBootControl 1.1, MergeStatus enum.
92 uint8_t source_slot; // Slot number when merge_status was written.
93 uint8_t reserved[57];
/bootable/recovery/minui/include/minui/
Dminui.h51 virtual uint8_t* data() { in data()
55 const uint8_t* data() const { in data()
56 return const_cast<const uint8_t*>(const_cast<GRSurface*>(this)->data()); in data()
75 void operator()(uint8_t* data) { in operator()
80 std::unique_ptr<uint8_t, DataDeleter> data_;
/bootable/recovery/install/include/install/
Dverifier.h31 using HasherUpdateCallback = std::function<void(const uint8_t* addr, uint64_t size)>;
70 virtual bool ReadFullyAtOffset(uint8_t* buffer, uint64_t byte_count, uint64_t offset) = 0;
94 bool LoadCertificateFromBuffer(const std::vector<uint8_t>& pem_content, Certificate* cert);
/bootable/recovery/fuse_sideload/include/
Dfuse_provider.h44 virtual bool ReadBlockAlignedData(uint8_t* buffer, uint32_t fetch_size,
68 bool ReadBlockAlignedData(uint8_t* buffer, uint32_t fetch_size,
93 bool ReadBlockAlignedData(uint8_t* buffer, uint32_t fetch_size,
/bootable/recovery/updater/
Dcommands.cpp318 static void MoveRange(std::vector<uint8_t>* dest, const RangeSet& locs, in MoveRange()
319 const std::vector<uint8_t>& source, size_t block_size) { in MoveRange()
320 const uint8_t* from = source.data(); in MoveRange()
321 uint8_t* to = dest->data(); in MoveRange()
332 std::vector<uint8_t>* buffer, size_t block_size, in ReadAll()
333 const std::function<int(const RangeSet&, std::vector<uint8_t>*)>& block_reader, in ReadAll()
334 const std::function<int(const std::string&, std::vector<uint8_t>*)>& stash_reader) const { in ReadAll()
351 std::vector<uint8_t> stash_buffer(stash.blocks() * block_size); in ReadAll()
360 void SourceInfo::DumpBuffer(const std::vector<uint8_t>& buffer, size_t block_size) const { in DumpBuffer()
369 uint8_t digest[SHA_DIGEST_LENGTH]; in DumpBuffer()
Dblockimg.cpp223 static void allocate(size_t size, std::vector<uint8_t>* buffer) { in allocate()
253 size_t Write(const uint8_t* data, size_t size) { in Write()
362 static bool receive_new_data(const uint8_t* data, size_t size, void* cookie) { in receive_new_data()
402 static bool receive_brotli_new_data(const uint8_t* data, size_t size, void* cookie) { in receive_brotli_new_data()
426 uint8_t buffer[buffer_size]; in receive_brotli_new_data()
429 uint8_t* next_out = buffer; in receive_brotli_new_data()
482 static int ReadBlocks(const RangeSet& src, std::vector<uint8_t>* buffer, int fd) { in ReadBlocks()
502 static int WriteBlocks(const RangeSet& tgt, const std::vector<uint8_t>& buffer, int fd) { in WriteBlocks()
545 std::vector<uint8_t> buffer;
546 uint8_t* patch_start;
[all …]
/bootable/recovery/minadbd/
Dfuse_adb_provider_test.cpp49 ASSERT_TRUE(data.ReadBlockAlignedData(reinterpret_cast<uint8_t*>(block_data), in TEST()
84 ASSERT_FALSE(data.ReadBlockAlignedData(reinterpret_cast<uint8_t*>(buf), 1, 0)); in TEST()
Dminadbd_services_test.cpp66 std::vector<uint8_t> received(kMinadbdMessageSize, '\0'); in ReadAndCheckCommandMessage()
69 std::vector<uint8_t> expected(kMinadbdMessageSize, '\0'); in ReadAndCheckCommandMessage()
164 std::vector<uint8_t> content(4096, 'a'); in TEST_F()
177 std::vector<uint8_t> content_from_fuse(4096); in TEST_F()

123