Lines Matching refs:data

58   std::string data;  in LoadFileContents()  local
59 if (!android::base::ReadFileToString(filename, &data)) { in LoadFileContents()
64 file->data = std::vector<unsigned char>(data.begin(), data.end()); in LoadFileContents()
65 SHA1(file->data.data(), file->data.size(), file->sha1); in LoadFileContents()
83 if (!android::base::ReadFully(dev, buffer.data(), buffer.size())) { in ReadPartitionToBuffer()
87 SHA1(buffer.data(), buffer.size(), out->sha1); in ReadPartitionToBuffer()
89 out->data = std::move(buffer); in ReadPartitionToBuffer()
117 if (!android::base::WriteFully(fd, file->data.data(), file->data.size())) { in SaveFileContents()
118 PLOG(ERROR) << "Failed to write " << file->data.size() << " bytes of data to " << filename; in SaveFileContents()
137 const unsigned char* data = file_contents.data.data(); in WriteBufferToPartition() local
138 size_t len = file_contents.data.size(); in WriteBufferToPartition()
153 if (!android::base::WriteFully(fd, data + start, len - start)) { in WriteBufferToPartition()
202 if (memcmp(buffer, data + p, to_read) != 0) { in WriteBufferToPartition()
341 const char* header = patch.data.data(); in GenerateTarget()
342 size_t header_bytes_read = patch.data.size(); in GenerateTarget()
354 if (backup_source && !CheckAndFreeSpaceOnCache(source_file.data.size())) { in GenerateTarget()
367 SinkFn sink = [&patched, &ctx](const unsigned char* data, size_t len) { in GenerateTarget() argument
368 SHA1_Update(&ctx, data, len); in GenerateTarget()
369 patched.data.insert(patched.data.end(), data, data + len); in GenerateTarget()
375 result = ApplyBSDiffPatch(source_file.data.data(), source_file.data.size(), patch, 0, sink); in GenerateTarget()
378 ApplyImagePatch(source_file.data.data(), source_file.data.size(), patch, sink, bonus_data); in GenerateTarget()
390 LOG(ERROR) << "target size " << patched.data.size() << " SHA-1 " << short_sha1(patched.sha1); in GenerateTarget()
391 LOG(ERROR) << "source size " << source_file.data.size() << " SHA-1 " in GenerateTarget()
395 SHA1(reinterpret_cast<const uint8_t*>(patch.data.data()), patch.data.size(), patch_digest); in GenerateTarget()
396 LOG(ERROR) << "patch size " << patch.data.size() << " SHA-1 " << short_sha1(patch_digest); in GenerateTarget()
400 SHA1(reinterpret_cast<const uint8_t*>(bonus_data->data.data()), bonus_data->data.size(), in GenerateTarget()
402 LOG(ERROR) << "bonus size " << bonus_data->data.size() << " SHA-1 " in GenerateTarget()