Home
last modified time | relevance | path

Searched refs:num_bytes (Results 1 – 25 of 27) sorted by relevance

12

/system/tpm/tpm_manager/server/
Dopenssl_crypto_util_impl.cc25 bool OpensslCryptoUtilImpl::GetRandomBytes(size_t num_bytes, in GetRandomBytes() argument
27 random_data->resize(num_bytes); in GetRandomBytes()
30 if (RAND_bytes(random_buffer, num_bytes) != 1) { in GetRandomBytes()
Dmock_openssl_crypto_util.cc31 bool MockOpensslCryptoUtil::FakeGetRandomBytes(size_t num_bytes, in FakeGetRandomBytes() argument
33 random_data->assign(num_bytes, 'a'); in FakeGetRandomBytes()
Dtpm2_initializer_impl.cc125 bool Tpm2InitializerImpl::GetTpmRandomData(size_t num_bytes, in GetTpmRandomData() argument
128 num_bytes, nullptr /* No Authorization */, random_data); in GetTpmRandomData()
Dopenssl_crypto_util.h35 virtual bool GetRandomBytes(size_t num_bytes,
Dopenssl_crypto_util_impl.h41 bool GetRandomBytes(size_t num_bytes,
Dmock_openssl_crypto_util.h34 bool FakeGetRandomBytes(size_t num_bytes, std::string* random_data);
Dtpm2_initializer_impl.h66 bool GetTpmRandomData(size_t num_bytes, std::string* random_data);
/system/connectivity/shill/net/
Dnetlink_message.cc97 size_t num_bytes) { in PrintBytes() argument
104 if (num_bytes >= sizeof(nlmsghdr)) { in PrintBytes()
107 num_bytes -= sizeof(nlmsghdr); in PrintBytes()
109 VLOG(log_level) << "Not enough bytes (" << num_bytes in PrintBytes()
114 PrintPayload(log_level, buf, num_bytes); in PrintBytes()
156 size_t num_bytes) { in PrintPayload() argument
157 while (num_bytes) { in PrintPayload()
159 size_t bytes_this_row = min(num_bytes, static_cast<size_t>(32)); in PrintPayload()
164 num_bytes -= bytes_this_row; in PrintPayload()
Dnetlink_message.h117 size_t num_bytes);
140 size_t num_bytes);
Dnetlink_attribute.cc425 size_t num_bytes) const { in EncodeGeneric()
430 header.nla_len = NLA_HDRLEN + num_bytes; in EncodeGeneric()
434 if (data && (num_bytes != 0)) { in EncodeGeneric()
435 result.Append(ByteString(data, num_bytes)); in EncodeGeneric()
Dnetlink_attribute.h128 ByteString EncodeGeneric(const unsigned char* data, size_t num_bytes) const;
/system/tpm/attestation/common/
Dmock_crypto_utility.cc26 bool FakeRandom(size_t num_bytes, std::string* output) { in FakeRandom() argument
27 *output = std::string(num_bytes, 'A'); in FakeRandom()
Dcrypto_utility.h32 virtual bool GetRandom(size_t num_bytes, std::string* random_data) const = 0;
Dcrypto_utility_impl.cc71 bool CryptoUtilityImpl::GetRandom(size_t num_bytes, in GetRandom() argument
74 if (num_bytes > static_cast<size_t>(std::numeric_limits<int>::max())) { in GetRandom()
77 random_data->resize(num_bytes); in GetRandom()
79 return (RAND_bytes(buffer, num_bytes) == 1); in GetRandom()
Dcrypto_utility_impl_test.cc79 size_t num_bytes = -1; in TEST_F() local
81 EXPECT_FALSE(crypto_utility_->GetRandom(num_bytes, &buffer)); in TEST_F()
Dcrypto_utility_impl.h38 bool GetRandom(size_t num_bytes, std::string* random_data) const override;
/system/tpm/trunks/
Dtpm_utility.h89 virtual TPM_RC GenerateRandom(size_t num_bytes,
258 size_t num_bytes,
285 size_t num_bytes,
Dtpm_utility_impl.h53 TPM_RC GenerateRandom(size_t num_bytes,
125 size_t num_bytes,
136 size_t num_bytes,
Dtrunks_factory_for_test.cc158 TPM_RC GenerateRandom(size_t num_bytes, in GenerateRandom() argument
161 return target_->GenerateRandom(num_bytes, delegate, random_data); in GenerateRandom()
310 size_t num_bytes, in DefineNVSpace() argument
312 return target_->DefineNVSpace(index, num_bytes, delegate); in DefineNVSpace()
334 size_t num_bytes, in ReadNVSpace() argument
337 return target_->ReadNVSpace(index, offset, num_bytes, nvram_data, delegate); in ReadNVSpace()
Dtpm_utility_impl.cc328 TPM_RC TpmUtilityImpl::GenerateRandom(size_t num_bytes, in GenerateRandom() argument
332 size_t bytes_left = num_bytes; in GenerateRandom()
347 CHECK_EQ(random_data->size(), num_bytes); in GenerateRandom()
1179 size_t num_bytes, in DefineNVSpace() argument
1182 if (num_bytes > MAX_NV_INDEX_SIZE) { in DefineNVSpace()
1216 public_data.data_size = num_bytes; in DefineNVSpace()
1358 size_t num_bytes, in ReadNVSpace() argument
1362 if (num_bytes > MAX_NV_BUFFER_SIZE) { in ReadNVSpace()
1392 num_bytes, in ReadNVSpace()
Dtrunks_client_test.cc79 size_t num_bytes = 70; in RNGTest() local
85 result = utility->GenerateRandom(num_bytes, session->GetDelegate(), in RNGTest()
92 if (num_bytes != random_data.size()) { in RNGTest()
Dtpm_utility_test.cc397 size_t num_bytes = 72; in TEST_F() local
411 num_bytes, &mock_authorization_delegate_, &random_data)); in TEST_F()
412 EXPECT_EQ(num_bytes, random_data.size()); in TEST_F()
416 size_t num_bytes = 5; in TEST_F() local
421 utility_.GenerateRandom(num_bytes, nullptr, &random_data)); in TEST_F()
/system/extras/boot_control_copy/
Dboot_control_copy.c97 static bool copy_data(int src_fd, int dst_fd, size_t num_bytes) in copy_data() argument
102 remaining = num_bytes; in copy_data()
/system/update_engine/
Dpayload_state_unittest.cc909 uint64_t num_bytes = 42 * 1000 * 1000; in TEST() local
910 payload_state.DownloadProgress(num_bytes); in TEST()
913 EXPECT_EQ(num_bytes, in TEST()
915 EXPECT_EQ(num_bytes, in TEST()
939 uint64_t num_bytes = 10000; in TEST() local
940 payload_state.DownloadProgress(num_bytes); in TEST()
941 EXPECT_EQ(num_bytes, in TEST()
943 EXPECT_EQ(num_bytes, in TEST()
954 EXPECT_EQ(num_bytes, in TEST()
/system/extras/pagecache/
Dpagecache.py57 def bytes_to_mb(self, num_bytes): argument
58 return "%.2f" % round(int(num_bytes) / 1024.0 / 1024.0, 2)

12