Searched defs:blob (Results 1 - 25 of 38) sorted by last modified time

12

/system/update_engine/payload_generator/
H A Dab_generator.cc174 // If this is a REPLACE, attempt to reuse portions of the existing blob.
247 // Set the data length to zero so we know to add the blob later.
285 brillo::Blob blob; local
288 diff_utils::GenerateBestFullOperation(data, version, &blob, &op_type));
290 // If the operation doesn't point to a data blob or points to a data blob of
292 if (aop->op.type() != op_type || aop->op.data_length() != blob.size()) {
294 aop->SetOperationBlob(blob, blob_file);
H A Dannotated_operation.cc39 bool AnnotatedOperation::SetOperationBlob(const brillo::Blob& blob, argument
41 if (blob.empty()) {
46 off_t data_offset = blob_file->StoreBlob(blob);
49 op.set_data_length(blob.size());
H A Dblob_file_writer.cc23 off_t BlobFileWriter::StoreBlob(const brillo::Blob& blob) { argument
25 if (!utils::PWriteAll(blob_fd_, blob.data(), blob.size(), *blob_file_size_))
29 *blob_file_size_ += blob.size();
H A Dblock_mapping.cc34 size_t HashValue(const brillo::Blob& blob) { argument
36 return hash_fn(string(blob.begin(), blob.end()));
48 brillo::Blob blob(block_size_);
50 if (!utils::PReadAll(fd, blob.data(), block_size_, byte_offset, &bytes_read))
54 return AddBlock(fd, byte_offset, blob);
120 brillo::Blob blob(block_size);
122 if (!utils::PReadAll(fd, blob.data(), block_size, byte_offset, &bytes_read))
126 *equals = blob == other_block;
135 block_data = std::move(blob);
[all...]
/system/tpm/attestation/server/
H A Dpkcs11_key_store_test.cc311 std::string blob; local
312 EXPECT_FALSE(key_store.Read(kDefaultUser, "test", &blob));
313 EXPECT_FALSE(key_store.Write(kDefaultUser, "test", blob));
314 EXPECT_FALSE(key_store.Read("", "test", &blob));
315 EXPECT_FALSE(key_store.Write("", "test", blob));
322 std::string blob; local
323 EXPECT_FALSE(key_store.Read(kDefaultUser, "test", &blob));
325 EXPECT_TRUE(key_store.Read(kDefaultUser, "test", &blob));
326 EXPECT_EQ("test_data", blob);
328 EXPECT_FALSE(key_store.Read(kDefaultUser, "test2", &blob));
347 std::string blob; local
375 std::string blob; local
387 std::string blob; local
397 std::string blob; local
407 std::string blob; local
428 std::string blob; local
451 std::string blob; local
560 std::string blob; local
[all...]
/system/nvram/core/
H A Dpersistence.cpp32 // Encodes an |object| as a protobuf message and writes it to |blob|. Note that
46 storage::Status EncodeObject(const Object& object, Blob* blob) { argument
47 BlobOutputStreamBuffer stream(blob);
58 // Decodes a protobuf-encoded |object| from |blob|. It is OK if the provided
59 // |blob| includes trailing data that doesn't belong to the encoded object.
67 storage::Status DecodeObject(const Blob& blob, Object* object) { argument
68 InputStreamBuffer stream(blob.data(), blob.size());
73 NVRAM_LOG_ERR("Failed to decode object of size %zu.", blob.size());
100 Blob blob; local
109 Blob blob; local
118 Blob blob; local
127 Blob blob; local
[all...]
/system/nvram/core/tests/
H A Dfake_storage.cpp19 #include <nvram/messages/blob.h>
31 Status Load(Blob* blob) { argument
40 NVRAM_CHECK(blob->Assign(blob_.data(), blob_.size()));
44 Status Store(const Blob& blob) { argument
49 NVRAM_CHECK(blob_.Assign(blob.data(), blob.size()));
86 // Space blob storage.
127 Status LoadHeader(Blob* blob) { argument
128 return g_header.Load(blob);
131 Status StoreHeader(const Blob& blob) { argument
143 LoadSpace(uint32_t index, Blob* blob) argument
148 StoreSpace(uint32_t index, const Blob& blob) argument
[all...]
/system/nvram/hal/
H A Dfake_nvram_storage.cpp78 nvram::storage::Status LoadFile(const char* name, nvram::Blob* blob) { argument
100 if (!blob->Resize(data_file_stat.st_size)) {
105 if (!android::base::ReadFully(data_file_fd.get(), blob->data(),
106 blob->size())) {
114 // Writes blob to the storage object indicated by |name|.
115 nvram::storage::Status StoreFile(const char* name, const nvram::Blob& blob) { argument
127 if (!android::base::WriteFully(data_file_fd.get(), blob.data(),
128 blob.size())) {
170 Status LoadHeader(Blob* blob) { argument
171 return LoadFile(kHeaderFileName, blob);
174 StoreHeader(const Blob& blob) argument
178 LoadSpace(uint32_t index, Blob* blob) argument
186 StoreSpace(uint32_t index, const Blob& blob) argument
[all...]
H A Dmemory_storage.cpp30 Status Load(Blob* blob) const {
35 if (!blob->Assign(blob_.data(), blob_.size())) {
42 Status Store(const Blob& blob) { argument
43 if (!blob_.Assign(blob.data(), blob.size())) {
58 // Stores the header blob.
81 Status LoadHeader(Blob* blob) { argument
82 return g_header.Load(blob);
85 Status StoreHeader(const Blob& blob) { argument
86 return g_header.Store(blob);
89 LoadSpace(uint32_t index, Blob* blob) argument
94 StoreSpace(uint32_t index, const Blob& blob) argument
[all...]
/system/nvram/messages/include/nvram/messages/
H A Dproto.hpp86 #include <nvram/messages/blob.h>
153 static bool Encode(const Blob& blob, ProtoWriter* writer) { argument
154 return writer->WriteLengthDelimited(blob.data(), blob.size());
157 static bool Decode(Blob& blob, ProtoReader* reader) { argument
158 return blob.Resize(reader->field_size()) &&
159 reader->ReadLengthDelimited(blob.data(), blob.size());
/system/nvram/messages/
H A Dnvram_messages.cpp19 #include <nvram/messages/blob.h>
177 bool Encode(const Message& msg, Blob* blob) { argument
178 BlobOutputStreamBuffer stream(blob);
/system/nvram/messages/tests/
H A Dnvram_messages_test.cpp30 Blob blob; local
31 ASSERT_TRUE(Encode(in, &blob));
32 ASSERT_TRUE(Decode(blob.data(), blob.size(), out));
/system/security/keystore/
H A Dauthorization_set.cpp51 if (a.blob.size() == 0)
52 return b.blob.size() != 0;
53 if (b.blob.size() == 0) return false;
55 retval = memcmp(&a.blob[0], &b.blob[0], std::min(a.blob.size(), b.blob.size()));
57 if (retval == 0) return a.blob.size() < b.blob.size();
83 if (a.blob
203 serializeParamValue(OutStreams& out, const hidl_vec<uint8_t>& blob) argument
325 deserializeParamValue(InStreams& in, hidl_vec<uint8_t>* blob) argument
[all...]
H A Dblob.h29 /* Here is the file format. There are two parts in blob.value, the secret and
31 * can be found in blob.length. The description is stored after the secret in
32 * plaintext, and its size is specified in blob.info. The total size of the two
34 * the second is the blob's type, and the third byte is flags. Fields other
35 * than blob.info, blob.length, and blob.value are modified by encryptBlob()
52 struct __attribute__((packed)) blob { struct
82 explicit Blob(blob b);
115 struct blob mBlo
[all...]
H A Dkey_store_service.cpp1852 Blob* blob) {
1853 // Read the blob rather than assuming the caller provided the right name/uid/blob triplet.
1855 ResponseCode responseCode = mKeyStore->getKeyForName(blob, name8, uid, TYPE_KEYMASTER_10);
1861 auto hidlKey = blob2hidlVec(*blob);
1862 auto& dev = mKeyStore->getDevice(*blob);
1880 newBlob.setFallback(blob->isFallback());
1881 newBlob.setEncrypted(blob->isEncrypted());
1882 newBlob.setSuperEncrypted(blob->isSuperEncrypted());
1883 newBlob.setCriticalToDeviceEncryption(blob
1850 upgradeKeyBlob(const String16& name, uid_t uid, const AuthorizationSet& params, Blob* blob) argument
[all...]
H A Dkeystore.cpp175 Blob blob; local
176 ResponseCode rc = get(filename, &blob, ::TYPE_ANY, userId);
191 shouldDelete = blob.isEncrypted();
270 * it must be read it again since the blob is encrypted each time
470 hidl_vec<uint8_t> blob; local
477 blob = keyBlob;
489 Blob keyBlob(&blob[0], blob.size(), NULL, 0, TYPE_KEYMASTER_10);
609 bool KeyStore::upgradeBlob(const char* filename, Blob* blob, const uint8_t oldVersion, argument
618 blob
652 importBlobAsKey(Blob* blob, const char* filename, uid_t uid) argument
[all...]
H A Dkeystore.h26 #include "blob.h"
56 km_device_t& getDevice(const Blob& blob) { argument
57 // We return a device, based on the nature of the blob to provide backward
59 return blob.isFallback() ? mFallbackDevice : mDevice;
151 bool upgradeBlob(const char* filename, Blob* blob, const uint8_t oldVersion,
155 * Takes a blob that is an PEM-encoded RSA key as a byte array and converts it to a DER-encoded
156 * PKCS#8 for import into a keymaster. Then it overwrites the original blob with the new blob
159 ResponseCode importBlobAsKey(Blob* blob, const char* filename, uid_t uid);
H A Dkeystore_aidl_hidl_marshalling_utils.cpp38 android::status_t writeKeymasterBlob(const hidl_vec<uint8_t>& blob, android::Parcel* out) { argument
39 int32_t size = int32_t(std::min<size_t>(blob.size(), std::numeric_limits<int32_t>::max()));
46 return out->write(&blob[0], size);
67 android::status_t writeBlobAsByteArray(const NullOr<const hidl_vec<uint8_t>&>& blob, argument
69 if (!blob.isOk()) {
73 int32_t(std::min<size_t>(blob.value().size(), std::numeric_limits<int32_t>::max()));
80 return out->write(&blob.value()[0], size);
108 result.blob = readKeymasterBlob(in);
138 rc = writeKeymasterBlob(param.blob, out);
H A Dkeystore_utils.h33 #include "blob.h"
64 inline static hidl_vec<uint8_t> blob2hidlVec(const Blob& blob) { argument
66 result.setToExternal(const_cast<uint8_t*>(blob.getValue()), blob.getLength());
H A Dlegacy_keymaster_device_wrapper.cpp99 keymaster_param_blob(tag, &keyParams[i].blob[0], keyParams[i].blob.size());
121 inline static keymaster_blob_t hidlVec2KmBlob(const hidl_vec<uint8_t>& blob) { argument
122 /* hidl unmarshals funny pointers if the the blob is empty */
123 if (blob.size()) return {&blob[0], blob.size()};
127 inline static keymaster_key_blob_t hidlVec2KmKeyBlob(const hidl_vec<uint8_t>& blob) { argument
128 /* hidl unmarshals funny pointers if the the blob is empty */
129 if (blob
133 kmBlob2hidlVec(const keymaster_key_blob_t& blob) argument
138 kmBlob2hidlVec(const keymaster_blob_t& blob) argument
[all...]
/system/security/keystore/include/keystore/
H A Dkeystore_hidl_support.h88 inline static hidl_vec<uint8_t> blob2hidlVec(const std::vector<uint8_t>& blob) { argument
90 result.setToExternal(const_cast<uint8_t*>(blob.data()), static_cast<size_t>(blob.size()));
/system/libufdt/tests/src/
H A Dufdt_overlay_test_app.c49 struct fdt_header *blob = ufdt_install_blob(base_buf, blob_len); local
50 if (!blob) {
56 new_blob = ufdt_apply_overlay(blob, blob_len, overlay_buf, overlay_len);
70 // Do not dto_free(blob) - it's the same as base_buf.
/system/libufdt/
H A Dufdt_overlay.c584 struct fdt_header *ufdt_install_blob(void *blob, size_t blob_size) { argument
588 dto_debug("ufdt_install_blob (0x%08jx)\n", (uintmax_t)blob);
596 pHeader = (struct fdt_header *)blob;
600 dto_error("incompatible blob version: %d, should be: %d",
604 dto_error("error validating blob: %s", fdt_strerror(err));
614 * Will dto_malloc a new fdt blob and return it. Will not dto_free parameters.
640 dto_error("failed to allocate memory for DTB blob with overlays\n");
/system/keymaster/
H A Dandroid_keymaster_test.cpp3241 // Load and use an old-style Keymaster1 software key blob. These blobs contain OCB-encrypted
3243 string km1_sw = read_file("km1_sw_rsa_512.blob");
3258 // Load and use an old-style Keymaster1 software key blob, without the version byte. These
3260 string km1_sw = read_file("km1_sw_rsa_512_unversioned.blob");
3275 // Load and use an old-style Keymaster1 software key blob. These blobs contain OCB-encrypted
3277 string km1_sw = read_file("km1_sw_ecdsa_256.blob");
3296 // Load and use an old softkeymaster blob. These blobs contain PKCS#8 key data.
3297 string km0_sw = read_file("km0_sw_rsa_512.blob");
3312 // Load and use an old softkeymaster blob. These blobs contain PKCS#8 key data.
3313 string km0_sw = read_file("km0_sw_rsa_512.blob");
3405 parse_cert_blob(const keymaster_blob_t& blob) argument
[all...]
H A Dandroid_keymaster_test_utils.h99 std::string(reinterpret_cast<const char*>(set[pos].blob.data),
100 set[pos].blob.data_length) == val;
107 std::string(reinterpret_cast<const char*>(set[pos].blob.data),
108 set[pos].blob.data_length) == val;
355 static void munge_blob(uint8_t* blob, size_t blob_length) { argument
356 if (blob && blob_length > 0 && *blob == 'P')
357 *blob = 'Q'; // Mind your Ps and Qs!
360 // Copy and un-modfy the blob. The caller must clean up the return value.
361 static uint8_t* unmunge_blob(const uint8_t* blob, size_ argument
[all...]

Completed in 293 milliseconds

12