Searched refs:rawBlob (Results 1 – 2 of 2) sorted by relevance
/system/security/keystore/ |
D | blob.cpp | 318 static ResponseCode writeBlob(const std::string& filename, Blob blob, blobv3* rawBlob, in writeBlob() argument 322 const size_t dataLength = rawBlob->length; in writeBlob() 323 rawBlob->length = htonl(rawBlob->length); in writeBlob() 331 memset(rawBlob->initialization_vector, 0, AES_BLOCK_SIZE); in writeBlob() 332 if (!RAND_bytes(rawBlob->initialization_vector, kGcmIvSizeBytes)) { in writeBlob() 337 auto rc = AES_gcm_encrypt(rawBlob->value /* in */, rawBlob->value /* out */, dataLength, in writeBlob() 338 aes_key, rawBlob->initialization_vector, rawBlob->aead_tag); in writeBlob() 342 size_t fileLength = offsetof(blobv3, value) + dataLength + rawBlob->info; in writeBlob() 351 const size_t writtenBytes = writeFully(out, reinterpret_cast<uint8_t*>(rawBlob), fileLength); in writeBlob() 371 blobv3* rawBlob = keyBlob.mBlob.get(); in writeBlobs() local [all …]
|
D | user_state.cpp | 120 blobv3 rawBlob; in copyMasterKeyFile() local 121 size_t length = readFully(in, (uint8_t*)&rawBlob, sizeof(rawBlob)); in copyMasterKeyFile() 130 size_t outLength = writeFully(out, (uint8_t*)&rawBlob, length); in copyMasterKeyFile() 162 blobv3 rawBlob; in readMasterKey() local 163 size_t length = readFully(in, (uint8_t*)&rawBlob, sizeof(rawBlob)); in readMasterKey() 169 if (length > SALT_SIZE && rawBlob.info == SALT_SIZE) { in readMasterKey() 170 salt = (uint8_t*)&rawBlob + length - SALT_SIZE; in readMasterKey() 176 if (rawBlob.type == TYPE_MASTER_KEY) { in readMasterKey()
|