Home
last modified time | relevance | path

Searched refs:Blob (Results 1 – 25 of 83) sorted by relevance

1234

/system/update_engine/payload_generator/
Dzip_unittest.cc47 explicit MemoryExtentWriter(brillo::Blob* data) : data_(data) { in MemoryExtentWriter()
67 brillo::Blob* data_;
71 bool DecompressWithWriter(const brillo::Blob& in, brillo::Blob* out) { in DecompressWithWriter()
86 bool ZipCompress(const brillo::Blob& in, brillo::Blob* out) const = 0;
87 bool ZipDecompress(const brillo::Blob& in, brillo::Blob* out) const = 0;
95 bool ZipCompress(const brillo::Blob& in, brillo::Blob* out) const { in ZipCompress()
98 bool ZipDecompress(const brillo::Blob& in, brillo::Blob* out) const { in ZipDecompress()
108 bool ZipCompress(const brillo::Blob& in, brillo::Blob* out) const { in ZipCompress()
111 bool ZipDecompress(const brillo::Blob& in, brillo::Blob* out) const { in ZipDecompress()
133 brillo::Blob in(in_str.begin(), in_str.end()); in TYPED_TEST()
[all …]
Dpayload_signer.h44 brillo::Blob* out_payload_metadata,
66 static bool SignHash(const brillo::Blob& hash,
68 brillo::Blob* out_signature);
73 const brillo::Blob& hash_data,
75 brillo::Blob* out_signature_blob);
89 brillo::Blob* out_signature_blob);
110 brillo::Blob* out_payload_hash_data,
111 brillo::Blob* out_metadata_hash);
123 const std::vector<brillo::Blob>& payload_signatures,
124 const std::vector<brillo::Blob>& metadata_signatures,
Dpayload_signer.cc55 bool ConvertSignatureToProtobufBlob(const vector<brillo::Blob>& signatures, in ConvertSignatureToProtobufBlob()
56 brillo::Blob* out_signature_blob) { in ConvertSignatureToProtobufBlob()
59 for (const brillo::Blob& signature : signatures) { in ConvertSignatureToProtobufBlob()
85 const brillo::Blob& signature_blob, in AddSignatureBlobToPayload()
86 const brillo::Blob& metadata_signature_blob, in AddSignatureBlobToPayload()
87 brillo::Blob* out_payload, in AddSignatureBlobToPayload()
105 brillo::Blob payload; in AddSignatureBlobToPayload()
184 bool CalculateHashFromPayload(const brillo::Blob& payload, in CalculateHashFromPayload()
188 brillo::Blob* out_hash_data, in CalculateHashFromPayload()
189 brillo::Blob* out_metadata_hash) { in CalculateHashFromPayload()
[all …]
Dpayload_signer_unittest.cc100 void SignSampleData(brillo::Blob* out_signature_blob, in SignSampleData()
102 brillo::Blob data_blob(std::begin(kDataToSign), in SignSampleData()
107 brillo::Blob hash_blob; in SignSampleData()
134 brillo::Blob payload_metadata_blob; in DoWriteAndLoadPayloadTest()
148 brillo::Blob padded_hash_data_{std::begin(kDataHash), std::end(kDataHash)};
164 brillo::Blob signature_blob; in TEST_F()
182 brillo::Blob signature_blob; in TEST_F()
196 brillo::Blob signature_blob; in TEST_F()
221 brillo::Blob unsigned_payload_hash, unsigned_metadata_hash; in TEST_F()
226 brillo::Blob signed_payload_hash, signed_metadata_hash; in TEST_F()
Dxz_android.cc33 explicit BlobReaderStream(const brillo::Blob& data) : data_(data) { in BlobReaderStream()
46 const brillo::Blob& data_;
54 explicit BlobWriterStream(brillo::Blob* data) : data_(data) { in BlobWriterStream()
67 brillo::Blob* data_;
84 bool XzCompress(const brillo::Blob& in, brillo::Blob* out) { in XzCompress()
Dblock_mapping.cc34 size_t HashValue(const brillo::Blob& blob) { in HashValue()
43 BlockMapping::BlockId BlockMapping::AddBlock(const brillo::Blob& block_data) { in AddBlock()
48 brillo::Blob blob(block_size_); in AddDiskBlock()
73 const brillo::Blob& block_data) { in AddBlock()
113 bool BlockMapping::UniqueBlock::CompareData(const brillo::Blob& other_block, in CompareData()
120 brillo::Blob blob(block_size); in CompareData()
147 if (mapping.AddBlock(brillo::Blob(block_size, '\0')) != 0) in MapPartitionBlocks()
Dblock_mapping.h44 BlockId AddBlock(const brillo::Blob& block_data);
65 BlockId AddBlock(int fd, off_t byte_offset, const brillo::Blob& block_data);
74 brillo::Blob block_data;
89 bool CompareData(const brillo::Blob& other_block, bool* equals);
Dab_generator_unittest.cc64 brillo::Blob part_data; in TestSplitReplaceOrReplaceBzOperation()
90 brillo::Blob op_data; in TestSplitReplaceOrReplaceBzOperation()
97 brillo::Blob op_blob; in TestSplitReplaceOrReplaceBzOperation()
144 brillo::Blob first_expected_data( in TestSplitReplaceOrReplaceBzOperation()
147 brillo::Blob first_expected_blob; in TestSplitReplaceOrReplaceBzOperation()
155 brillo::Blob first_data_blob(first_op.data_length()); in TestSplitReplaceOrReplaceBzOperation()
173 brillo::Blob second_expected_data( in TestSplitReplaceOrReplaceBzOperation()
176 brillo::Blob second_expected_blob; in TestSplitReplaceOrReplaceBzOperation()
184 brillo::Blob second_data_blob(second_op.data_length()); in TestSplitReplaceOrReplaceBzOperation()
217 brillo::Blob part_data; in TestMergeReplaceOrReplaceBzOperations()
[all …]
Ddelta_diff_utils.h103 brillo::Blob* out_data,
111 brillo::Blob* out);
117 bool GenerateBestFullOperation(const brillo::Blob& new_data,
119 brillo::Blob* out_blob,
Ddelta_diff_utils_unittest.cc49 const brillo::Blob& data) { in WriteExtents()
90 brillo::Blob file_data(part.size); in InitializePartitionWithUniqueBlocks()
94 brillo::Blob block_data(prefix.begin(), prefix.end()); in InitializePartitionWithUniqueBlocks()
165 brillo::Blob data_blob(block_size_); in TEST_F()
175 brillo::Blob data; in TEST_F()
226 brillo::Blob file_data; in TEST_F()
234 brillo::Blob data; in TEST_F()
285 brillo::Blob data_blob(kBlockSize); in TEST_F()
297 brillo::Blob data; in TEST_F()
329 brillo::Blob ones(kBlockSize, 1); in TEST_F()
[all …]
Ddelta_diff_utils.cc157 bool ContainsGZip(const brillo::Blob& data) { in ContainsGZip()
440 brillo::Blob data; in DeltaReadFile()
496 bool GenerateBestFullOperation(const brillo::Blob& new_data, in GenerateBestFullOperation()
498 brillo::Blob* out_blob, in GenerateBestFullOperation()
508 *out_blob = brillo::Blob(); in GenerateBestFullOperation()
517 brillo::Blob new_data_xz; in GenerateBestFullOperation()
527 brillo::Blob new_data_bz; in GenerateBestFullOperation()
555 brillo::Blob* out_data, in ReadExtentsToDiff()
587 brillo::Blob new_data; in ReadExtentsToDiff()
596 brillo::Blob data_blob; in ReadExtentsToDiff()
[all …]
/system/core/include/utils/
DBlobCache.h121 class Blob : public RefBase {
123 Blob(const void* data, size_t size, bool copyData);
124 ~Blob();
126 bool operator<(const Blob& rhs) const;
133 Blob(const Blob&);
134 void operator=(const Blob&);
151 CacheEntry(const sp<Blob>& key, const sp<Blob>& value);
157 sp<Blob> getKey() const;
158 sp<Blob> getValue() const;
160 void setValue(const sp<Blob>& value);
[all …]
/system/core/libutils/
DBlobCache.cpp83 sp<Blob> dummyKey(new Blob(key, keySize, false)); in set()
90 sp<Blob> keyBlob(new Blob(key, keySize, true)); in set()
91 sp<Blob> valueBlob(new Blob(value, valueSize, true)); in set()
112 sp<Blob> valueBlob(new Blob(value, valueSize, true)); in set()
113 sp<Blob> oldValueBlob(mCacheEntries[index].getValue()); in set()
143 sp<Blob> dummyKey(new Blob(key, keySize, false)); in get()
153 sp<Blob> valueBlob(mCacheEntries[index].getValue()); in get()
173 sp<Blob> keyBlob = e.getKey(); in getFlattenedSize()
174 sp<Blob> valueBlob = e.getValue(); in getFlattenedSize()
201 sp<Blob> keyBlob = e.getKey(); in flatten()
[all …]
/system/update_engine/common/
Dhash_calculator.h64 const brillo::Blob& raw_hash() const { in raw_hash()
80 brillo::Blob* out_hash);
81 static bool RawHashOfData(const brillo::Blob& data,
82 brillo::Blob* out_hash);
84 brillo::Blob* out_hash);
89 static std::string HashOfData(const brillo::Blob& data);
95 brillo::Blob raw_hash_;
Dhash_calculator.cc54 brillo::Blob buffer(kBufferSize); in UpdateFile()
91 brillo::Blob* out_hash) { in RawHashOfBytes()
99 bool HashCalculator::RawHashOfData(const brillo::Blob& data, in RawHashOfData()
100 brillo::Blob* out_hash) { in RawHashOfData()
105 brillo::Blob* out_hash) { in RawHashOfFile()
129 string HashCalculator::HashOfData(const brillo::Blob& data) { in HashOfData()
Dhash_calculator_unittest.cc56 brillo::Blob raw_hash(std::begin(kExpectedRawHash), in TEST_F()
67 brillo::Blob raw_hash(std::begin(kExpectedRawHash), in TEST_F()
82 brillo::Blob raw_hash(std::begin(kExpectedRawHash), in TEST_F()
125 brillo::Blob raw_hash(std::begin(kExpectedRawHash), in TEST_F()
147 brillo::Blob exp_raw_hash(std::begin(kExpectedRawHash), in TEST_F()
149 brillo::Blob raw_hash; in TEST_F()
/system/update_engine/payload_consumer/
Ddelta_performer_unittest.cc120 brillo::Blob GeneratePayload(const brillo::Blob& blob_data, in GeneratePayload()
128 brillo::Blob GeneratePayload(const brillo::Blob& blob_data, in GeneratePayload()
173 brillo::Blob payload_data; in GeneratePayload()
181 brillo::Blob ApplyPayload(const brillo::Blob& payload_data, in ApplyPayload()
184 return ApplyPayloadToData(payload_data, source_path, brillo::Blob(), in ApplyPayload()
193 brillo::Blob ApplyPayloadToData(const brillo::Blob& payload_data, in ApplyPayloadToData()
195 const brillo::Blob& target_data, in ApplyPayloadToData()
218 brillo::Blob partition_data; in ApplyPayloadToData()
262 brillo::Blob payload = GeneratePayload(brillo::Blob(), in DoMetadataSignatureTest()
341 brillo::Blob expected_data = brillo::Blob(std::begin(kRandomString), in TEST_F()
[all …]
Dpayload_verifier.cc87 bool PayloadVerifier::VerifySignature(const brillo::Blob& signature_blob, in VerifySignature()
89 const brillo::Blob& hash_data) { in VerifySignature()
102 std::vector<brillo::Blob> tested_hashes; in VerifySignature()
106 brillo::Blob sig_data(signature.data().begin(), signature.data().end()); in VerifySignature()
107 brillo::Blob sig_hash_data; in VerifySignature()
130 const brillo::Blob& sig_data, in GetRawHashFromSignature()
132 brillo::Blob* out_hash_data) { in GetRawHashFromSignature()
159 brillo::Blob hash_data(keysize); in GetRawHashFromSignature()
173 bool PayloadVerifier::PadRSA2048SHA256Hash(brillo::Blob* hash) { in PadRSA2048SHA256Hash()
Dpayload_verifier.h40 static bool VerifySignature(const brillo::Blob& signature_blob,
42 const brillo::Blob& hash_data);
47 static bool GetRawHashFromSignature(const brillo::Blob& sig_data,
49 brillo::Blob* out_hash_data);
56 static bool PadRSA2048SHA256Hash(brillo::Blob* hash);
Dxz_extent_writer_unittest.cc95 void WriteAll(const brillo::Blob& compressed) { in WriteAll()
109 const brillo::Blob sample_data_{
122 WriteAll(brillo::Blob(std::begin(kCompressedDataNoCheck), in TEST_F()
128 WriteAll(brillo::Blob(std::begin(kCompressedDataCRC32), in TEST_F()
136 WriteAll(brillo::Blob(std::begin(kCompressed30KiBofA), in TEST_F()
138 brillo::Blob expected_data(30 * 1024, 'a'); in TEST_F()
152 brillo::Blob compressed(std::begin(kCompressed30KiBofA), in TEST_F()
161 brillo::Blob expected_data(30 * 1024, 'a'); in TEST_F()
Dbzip_extent_writer_unittest.cc79 brillo::Blob buf; in TEST_F()
95 brillo::Blob compressed_data(std::begin(kCompressedData), in TEST_F()
98 const brillo::Blob::size_type kDecompressedLength = 800 * 1024; // 800 KiB in TEST_F()
101 brillo::Blob decompressed_data(kDecompressedLength); in TEST_F()
115 brillo::Blob original_compressed_data = compressed_data; in TEST_F()
116 for (brillo::Blob::size_type i = 0; i < compressed_data.size(); in TEST_F()
126 brillo::Blob output; in TEST_F()
Dextent_writer_unittest.cc84 brillo::Blob result_file; in TEST_F()
87 brillo::Blob expected_file(kBlockSize); in TEST_F()
132 brillo::Blob data(kBlockSize * 3); in WriteAlignedExtents()
152 brillo::Blob result_file; in WriteAlignedExtents()
155 brillo::Blob expected_file; in WriteAlignedExtents()
184 brillo::Blob data(kBlockSize * 2); in TestZeroPad()
202 brillo::Blob result_file; in TestZeroPad()
205 brillo::Blob expected_file; in TestZeroPad()
233 brillo::Blob data(17); in TEST_F()
252 brillo::Blob resultant_data; in TEST_F()
[all …]
/system/security/keystore/
Dblob.cpp31 Blob::Blob(const uint8_t* value, size_t valueLength, const uint8_t* info, uint8_t infoLength, in Blob() function in Blob
58 Blob::Blob(blob b) { in Blob() function in Blob
62 Blob::Blob() { in Blob() function in Blob
66 bool Blob::isEncrypted() const { in isEncrypted()
74 void Blob::setEncrypted(bool encrypted) { in setEncrypted()
82 void Blob::setFallback(bool fallback) { in setFallback()
90 ResponseCode Blob::writeBlob(const char* filename, AES_KEY* aes_key, State state, in writeBlob()
153 ResponseCode Blob::readBlob(const char* filename, AES_KEY* aes_key, State state) { in readBlob()
Dkeystore.h42 keymaster2_device_t* getDeviceForBlob(const Blob& blob) const { in getDeviceForBlob()
70 ResponseCode get(const char* filename, Blob* keyBlob, const BlobType type, uid_t userId);
71 ResponseCode put(const char* filename, Blob* keyBlob, uid_t userId);
87 ResponseCode getKeyForName(Blob* keyBlob, const android::String8& keyName, const uid_t uid,
132 bool upgradeBlob(const char* filename, Blob* blob, const uint8_t oldVersion,
140 ResponseCode importBlobAsKey(Blob* blob, const char* filename, uid_t uid);
Dblob.h77 class Blob {
79 Blob(const uint8_t* value, size_t valueLength, const uint8_t* info, uint8_t infoLength,
81 Blob(blob b);
83 Blob();

1234