/* * Copyright (c) Hisilicon Technologies Co., Ltd. 2012-2018. All rights reserved. * Description: process keymaster 3.0 hidl header file * Author: Hisilicon * Create: 2012.7.16 * History: 2019-01-19 CSEC work fix */ #ifndef HIDL_GENERATED_android_hardware_keymaster_V3_0_KeymasterDevice_H_ #define HIDL_GENERATED_android_hardware_keymaster_V3_0_KeymasterDevice_H_ #include #include #include #include namespace android { namespace hardware { namespace keymaster { namespace V3_0 { namespace implementation { using ::android::hardware::keymaster::V3_0::ErrorCode; using ::android::hardware::keymaster::V3_0::IKeymasterDevice; using ::android::hardware::keymaster::V3_0::KeyCharacteristics; using ::android::hardware::keymaster::V3_0::KeyFormat; using ::android::hardware::keymaster::V3_0::KeyParameter; using ::android::hardware::keymaster::V3_0::KeyPurpose; using ::android::hardware::Return; using ::android::hardware::Void; using ::android::hardware::hidl_vec; using ::android::hardware::hidl_string; using ::android::sp; class KeymasterDevice : public IKeymasterDevice { public: KeymasterDevice(keymaster2_device_t* dev, uint32_t hardware_version, bool hardware_supports_ec, bool hardware_supports_all_digests) : keymaster_device_(dev), hardware_version_(hardware_version), hardware_supports_ec_(hardware_supports_ec), hardware_supports_all_digests_(hardware_supports_all_digests) {} virtual ~KeymasterDevice(); // Methods from ::android::hardware::keymaster::V3_0::IKeymasterDevice follow. Return getHardwareFeatures(getHardwareFeatures_cb _hidl_cb) override; Return addRngEntropy(const hidl_vec& data) override; Return generateKey(const hidl_vec& keyParams, generateKey_cb _hidl_cb) override; Return getKeyCharacteristics(const hidl_vec& keyBlob, const hidl_vec& clientId, const hidl_vec& appData, getKeyCharacteristics_cb _hidl_cb) override; Return importKey(const hidl_vec& params, KeyFormat keyFormat, const hidl_vec& keyData, importKey_cb _hidl_cb) override; Return exportKey(KeyFormat exportFormat, const hidl_vec& keyBlob, const hidl_vec& clientId, const hidl_vec& appData, exportKey_cb _hidl_cb) override; Return attestKey(const hidl_vec& keyToAttest, const hidl_vec& attestParams, attestKey_cb _hidl_cb) override; Return upgradeKey(const hidl_vec& keyBlobToUpgrade, const hidl_vec& upgradeParams, upgradeKey_cb _hidl_cb) override; Return deleteKey(const hidl_vec& keyBlob) override; Return deleteAllKeys() override; Return destroyAttestationIds() override; Return begin(KeyPurpose purpose, const hidl_vec& key, const hidl_vec& inParams, begin_cb _hidl_cb) override; Return update(uint64_t operationHandle, const hidl_vec& inParams, const hidl_vec& input, update_cb _hidl_cb) override; Return finish(uint64_t operationHandle, const hidl_vec& inParams, const hidl_vec& input, const hidl_vec& signature, finish_cb _hidl_cb) override; Return abort(uint64_t operationHandle) override; private: keymaster2_device_t* keymaster_device_; uint32_t hardware_version_; bool hardware_supports_ec_; bool hardware_supports_all_digests_; }; extern "C" IKeymasterDevice* HIDL_FETCH_IKeymasterDevice(const char* name); } // namespace implementation } // namespace V3_0 } // namespace keymaster } // namespace hardware } // namespace android #endif // HIDL_GENERATED_android_hardware_keymaster_V3_0_KeymasterDevice_H_