Home
last modified time | relevance | path

Searched refs:UniquePtr (Results 1 – 25 of 91) sorted by relevance

1234

/system/chre/util/include/chre/util/
Dunique_ptr_impl.h27 UniquePtr<ObjectType>::UniquePtr() : mObject(nullptr) {} in UniquePtr() function
30 UniquePtr<ObjectType>::UniquePtr(ObjectType *object) : mObject(object) {} in UniquePtr() function
33 UniquePtr<ObjectType>::UniquePtr(UniquePtr<ObjectType>&& other) { in UniquePtr() function
39 UniquePtr<ObjectType>::~UniquePtr() { in ~UniquePtr()
48 bool UniquePtr<ObjectType>::isNull() const { in isNull()
53 ObjectType *UniquePtr<ObjectType>::get() const { in get()
58 ObjectType *UniquePtr<ObjectType>::release() { in release()
65 ObjectType *UniquePtr<ObjectType>::operator->() const {
70 ObjectType& UniquePtr<ObjectType>::operator*() const {
75 ObjectType& UniquePtr<ObjectType>::operator[](size_t index) const {
[all …]
Dunique_ptr.h30 class UniquePtr : public NonCopyable {
35 UniquePtr();
45 UniquePtr(ObjectType *object);
52 UniquePtr(UniquePtr<ObjectType>&& other);
57 ~UniquePtr();
105 UniquePtr<ObjectType>& operator=(UniquePtr<ObjectType>&& other);
120 UniquePtr<ObjectType> MakeUnique(Args&&... args);
/system/chre/apps/include/chre/apps/
Dapps.h25 extern UniquePtr<Nanoapp> *gNanoappGnssWorld;
26 extern UniquePtr<Nanoapp> *gNanoappHelloWorld;
27 extern UniquePtr<Nanoapp> *gNanoappImuCal;
28 extern UniquePtr<Nanoapp> *gNanoappMessageWorld;
29 extern UniquePtr<Nanoapp> *gNanoappSensorWorld;
30 extern UniquePtr<Nanoapp> *gNanoappTimerWorld;
31 extern UniquePtr<Nanoapp> *gNanoappWifiWorld;
32 extern UniquePtr<Nanoapp> *gNanoappWwanWorld;
/system/chre/util/tests/
Dunique_ptr_test.cc5 using chre::UniquePtr;
28 TEST(UniquePtr, Construct) { in TEST() argument
29 UniquePtr<Value> myInt = MakeUnique<Value>(0xcafe); in TEST()
37 TEST(UniquePtr, MoveConstruct) { in TEST() argument
38 UniquePtr<Value> myInt = MakeUnique<Value>(0xcafe); in TEST()
42 UniquePtr<Value> moved(std::move(myInt)); in TEST()
47 TEST(UniquePtr, Move) { in TEST() argument
51 UniquePtr<Value> myInt = MakeUnique<Value>(0xcafe); in TEST()
55 UniquePtr<Value> myMovedInt = MakeUnique<Value>(0); in TEST()
67 TEST(UniquePtr, Release) { in TEST() argument
[all …]
/system/core/trusty/keymaster/
Dtrusty_keymaster_main.cpp126 UniquePtr<uint8_t[]> key_deleter(key); in test_import_rsa()
131 UniquePtr<uint8_t[]> message(new uint8_t[message_len]); in test_import_rsa()
141 UniquePtr<uint8_t[]> signature_deleter(signature); in test_import_rsa()
172 UniquePtr<uint8_t[]> deleter(key); in test_rsa()
177 UniquePtr<uint8_t[]> message(new uint8_t[message_len]); in test_rsa()
187 UniquePtr<uint8_t[]> signature_deleter(signature); in test_rsa()
208 UniquePtr<EVP_PKEY, EVP_PKEY_Delete> pkey(d2i_PUBKEY(NULL, &tmp, exported_size)); in test_rsa()
209 UniquePtr<EVP_PKEY_CTX, EVP_PKEY_CTX_Delete> ctx(EVP_PKEY_CTX_new(pkey.get(), NULL)); in test_rsa()
244 UniquePtr<uint8_t[]> deleter(key); in test_import_ecdsa()
249 UniquePtr<uint8_t[]> message(new uint8_t[message_len]); in test_import_ecdsa()
[all …]
/system/keymaster/
Dandroid_keymaster_messages_test.cpp40 UniquePtr<uint8_t[]> buf(new uint8_t[size]); in round_trip()
71 UniquePtr<EmptyKeymasterResponse> deserialized(round_trip(ver, msg, 5)); in TEST()
80 UniquePtr<EmptyKeymasterResponse> deserialized(round_trip(ver, msg, 4)); in TEST()
89 UniquePtr<SupportedByAlgorithmRequest> deserialized(round_trip(ver, req, 4)); in TEST()
100 UniquePtr<SupportedByAlgorithmAndPurposeRequest> deserialized(round_trip(ver, req, 8)); in TEST()
113 UniquePtr<SupportedResponse<keymaster_digest_t>> deserialized(round_trip(ver, rsp, 20)); in TEST()
134 UniquePtr<GenerateKeyRequest> deserialized(round_trip(ver, req, 78)); in TEST()
147 UniquePtr<GenerateKeyResponse> deserialized(round_trip(ver, rsp, 109)); in TEST()
162 UniquePtr<GenerateKeyResponse> deserialized(round_trip(ver, rsp, 4)); in TEST()
176 UniquePtr<GetKeyCharacteristicsRequest> deserialized(round_trip(ver, req, 85)); in TEST()
[all …]
Dopenssl_utils.h50 typedef UniquePtr<name, name##_Delete> name##_Ptr;
70 typedef UniquePtr<BIGNUM, BIGNUM_Delete> BIGNUM_Ptr;
81 inline void release_because_ownership_transferred(UniquePtr<T, Delete_T>& p) { in release_because_ownership_transferred()
87 UniquePtr<EVP_PKEY, EVP_PKEY_Delete>* pkey);
92 UniquePtr<EVP_PKEY, EVP_PKEY_Delete>* evp_pkey);
Dopenssl_utils.cpp84 UniquePtr<EVP_PKEY, EVP_PKEY_Delete>* pkey) { in convert_pkcs8_blob_to_evp()
88 UniquePtr<PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO_Delete> pkcs8( in convert_pkcs8_blob_to_evp()
109 UniquePtr<EVP_PKEY, EVP_PKEY_Delete>* pkey) { in KeyMaterialToEvpKey()
133 UniquePtr<BN_CTX, BN_CTX_Delete> bn_ctx(BN_CTX_new()); in ec_group_size_bits()
134 UniquePtr<BIGNUM, BIGNUM_Delete> order(BN_new()); in ec_group_size_bits()
Dasymmetric_key_factory.cpp45 UniquePtr<Key>* key) const { in LoadKey()
46 UniquePtr<AsymmetricKey> asymmetric_key; in LoadKey()
56 UniquePtr<EVP_PKEY, EVP_PKEY_Delete> pkey_deleter(pkey); in LoadKey()
Dhkdf.cpp40 UniquePtr<uint8_t[]> zeros(new uint8_t[digest_size_]); in GenerateKey()
50 UniquePtr<uint8_t[]> pseudo_random_key(new uint8_t[digest_size_]); in GenerateKey()
66 UniquePtr<uint8_t[]> buf(new uint8_t[digest_size_ + info_len + 1]); in GenerateKey()
67 UniquePtr<uint8_t[]> digest(new uint8_t[digest_size_]); in GenerateKey()
Drsa_key_factory.cpp83 UniquePtr<BIGNUM, BIGNUM_Delete> exponent(BN_new()); in GenerateKey()
84 UniquePtr<RSA, RsaKey::RSA_Delete> rsa_key(RSA_new()); in GenerateKey()
85 UniquePtr<EVP_PKEY, EVP_PKEY_Delete> pkey(EVP_PKEY_new()); in GenerateKey()
135 UniquePtr<EVP_PKEY, EVP_PKEY_Delete> pkey; in UpdateImportKeyDescription()
141 UniquePtr<RSA, RsaKey::RSA_Delete> rsa_key(EVP_PKEY_get1_RSA(pkey.get())); in UpdateImportKeyDescription()
178 UniquePtr<AsymmetricKey>* key) const { in CreateEmptyKey()
Dsymmetric_key.h61 virtual keymaster_error_t key_material(UniquePtr<uint8_t[]>* key_material, size_t* size) const;
62 virtual keymaster_error_t formatted_key_material(keymaster_key_format_t, UniquePtr<uint8_t[]>*, in formatted_key_material()
76 UniquePtr<uint8_t[]> key_data_;
Dec_key_factory.cpp94 UniquePtr<EC_KEY, EC_KEY_Delete> ec_key(EC_KEY_new()); in GenerateKey()
95 UniquePtr<EVP_PKEY, EVP_PKEY_Delete> pkey(EVP_PKEY_new()); in GenerateKey()
99 UniquePtr<EC_GROUP, EC_GROUP_Delete> group(ChooseGroup(ec_curve)); in GenerateKey()
155 UniquePtr<EVP_PKEY, EVP_PKEY_Delete> pkey; in UpdateImportKeyDescription()
161 UniquePtr<EC_KEY, EC_KEY_Delete> ec_key(EVP_PKEY_get1_EC_KEY(pkey.get())); in UpdateImportKeyDescription()
244 UniquePtr<AsymmetricKey>* key) const { in CreateEmptyKey()
Dkdf.h42 UniquePtr<uint8_t[]> secret_key_;
44 UniquePtr<uint8_t[]> salt_;
Dnist_curve_key_exchange.h64 UniquePtr<EC_KEY, EC_KEY_Delete> private_key_;
65 UniquePtr<uint8_t[]> public_key_;
Decies_kem.h52 UniquePtr<KeyExchange> key_exchange_;
53 UniquePtr<Rfc5869Sha256Kdf> kdf_;
/system/chre/core/
Devent_loop.cc43 for (const UniquePtr<Nanoapp>& app : mNanoapps) { in findNanoappInstanceIdByAppId()
64 for (const UniquePtr<Nanoapp>& nanoapp : mNanoapps) { in forEachNanoapp()
87 for (const UniquePtr<Nanoapp>& app : mNanoapps) { in run()
109 for (const UniquePtr<Nanoapp>& app : mNanoapps) { in run()
129 bool EventLoop::startNanoapp(UniquePtr<Nanoapp>& nanoapp) { in startNanoapp()
236 bool EventLoop::deliverNextEvent(const UniquePtr<Nanoapp>& app) { in deliverNextEvent()
253 for (const UniquePtr<Nanoapp>& app : mNanoapps) { in lookupAppByInstanceId()
264 const UniquePtr<Nanoapp>& nanoapp = mNanoapps[index]; in stopNanoapp()
/system/security/keystore-engine/
Dmethods.h37 typedef UniquePtr<DSA, struct DSA_Delete> Unique_DSA;
44 typedef UniquePtr<EC_KEY, EC_KEY_Delete> Unique_EC_KEY;
51 typedef UniquePtr<RSA, struct RSA_Delete> Unique_RSA;
/system/chre/core/include/chre/core/
Devent_loop.h87 bool startNanoapp(UniquePtr<Nanoapp>& nanoapp);
183 DynamicVector<UniquePtr<Nanoapp>> mNanoapps;
209 bool deliverNextEvent(const UniquePtr<Nanoapp>& app);
/system/chre/platform/linux/include/chre/target_platform/
Dstatic_nanoapp_init.h34 UniquePtr<Nanoapp> *gNanoapp##appName; \
38 static UniquePtr<Nanoapp> nanoapp = MakeUnique<Nanoapp>(); \
/system/security/softkeymaster/
Dkeymaster_openssl.cpp43 typedef UniquePtr<BIGNUM, BIGNUM_Delete> Unique_BIGNUM;
48 typedef UniquePtr<EVP_PKEY, EVP_PKEY_Delete> Unique_EVP_PKEY;
53 typedef UniquePtr<PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO_Delete> Unique_PKCS8_PRIV_KEY_INFO;
58 typedef UniquePtr<DSA, DSA_Delete> Unique_DSA;
63 typedef UniquePtr<EC_KEY, EC_KEY_Delete> Unique_EC_KEY;
68 typedef UniquePtr<EC_GROUP, EC_GROUP_Delete> Unique_EC_GROUP;
73 typedef UniquePtr<RSA, RSA_Delete> Unique_RSA;
79 typedef UniquePtr<keymaster0_device_t> Unique_keymaster_device_t;
88 inline void release_because_ownership_transferred(UniquePtr<T, Delete_T>& p) { in release_because_ownership_transferred()
127 UniquePtr<unsigned char, Malloc_Free> derData( in wrap_key()
[all …]
/system/keymaster/include/keymaster/
Dandroid_keymaster.h88 const KeyFactory** factory, UniquePtr<Key>* key);
90 UniquePtr<KeymasterContext> context_;
91 UniquePtr<OperationTable> operation_table_;
Dasymmetric_key_factory.h36 UniquePtr<Key>* key) const override;
40 UniquePtr<AsymmetricKey>* key) const = 0;
/system/chre/platform/slpi/include/chre/target_platform/
Dstatic_nanoapp_init.h36 UniquePtr<Nanoapp> *gNanoapp##appName; \
40 static UniquePtr<Nanoapp> nanoapp = MakeUnique<Nanoapp>(); \
/system/security/keystore/
Dkeystore_utils.h55 typedef UniquePtr<EVP_PKEY, EVP_PKEY_Delete> Unique_EVP_PKEY;
60 typedef UniquePtr<PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO_Delete> Unique_PKCS8_PRIV_KEY_INFO;

1234