blob: ad7536043fc57fbc4c661a1f59849ccd508bdc52 [file] [log] [blame]
David Zeuthenc75ac312019-10-28 13:16:45 -04001/*
2 * Copyright 2019, The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ANDROID_HARDWARE_IDENTITY_IDENTITYCREDENTIALSTORE_H
18#define ANDROID_HARDWARE_IDENTITY_IDENTITYCREDENTIALSTORE_H
19
20#include <android/hardware/identity/1.0/IIdentityCredentialStore.h>
21
22namespace android {
23namespace hardware {
24namespace identity {
25namespace implementation {
26
27using ::android::hardware::hidl_string;
28using ::android::hardware::hidl_vec;
29using ::android::hardware::Return;
30using ::android::hardware::Void;
31using ::android::hardware::identity::V1_0::IIdentityCredentialStore;
32using ::android::hardware::identity::V1_0::Result;
33using ::android::hardware::identity::V1_0::ResultCode;
34
35class IdentityCredentialStore : public IIdentityCredentialStore {
36 public:
37 IdentityCredentialStore() {}
38
39 // The GCM chunk size used by this implementation is 64 KiB.
40 static constexpr size_t kGcmChunkSize = 64 * 1024;
41
42 // Methods from ::android::hardware::identity::IIdentityCredentialStore follow.
43 Return<void> getHardwareInformation(getHardwareInformation_cb _hidl_cb) override;
44 Return<void> createCredential(const hidl_string& docType, bool testCredential,
45 createCredential_cb _hidl_cb) override;
46 Return<void> getCredential(const hidl_vec<uint8_t>& credentialData,
47 getCredential_cb _hidl_cb) override;
48};
49
50} // namespace implementation
51} // namespace identity
52} // namespace hardware
53} // namespace android
54
55#endif // ANDROID_HARDWARE_IDENTITY_IDENTITYCREDENTIALSTORE_H